equal
deleted
inserted
replaced
17 return path; |
17 return path; |
18 end |
18 end |
19 |
19 |
20 local function get_http_event(host, app_path, key) |
20 local function get_http_event(host, app_path, key) |
21 local method, path = key:match("^(%S+)%s+(.+)$"); |
21 local method, path = key:match("^(%S+)%s+(.+)$"); |
22 if not method and key:sub(1,1) == "/" then |
22 if not method then |
|
23 if key:sub(1,1) ~= "/" then |
|
24 return nil; |
|
25 end |
23 method, path = "GET", key; |
26 method, path = "GET", key; |
24 else |
|
25 return nil; |
|
26 end |
27 end |
27 path = normalize_path(path); |
28 path = normalize_path(path); |
28 return method:upper().." "..host..app_path..path; |
29 return method:upper().." "..host..app_path..path; |
29 end |
30 end |
30 |
31 |