diff options
-rw-r--r-- | net/http.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/http.lua b/net/http.lua index 5fbed4fe..17c755cf 100644 --- a/net/http.lua +++ b/net/http.lua @@ -185,14 +185,15 @@ end local function request(self, u, ex, callback) local req = url.parse(u); - req.url = u; - req.http = self; if not (req and req.host) then callback("invalid-url", 0, req); return nil, "invalid-url"; end + req.url = u; + req.http = self; + if not req.path then req.path = "/"; end |