aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2020-07-07 13:52:45 +0100
committerMatthew Wild <mwild1@gmail.com>2020-07-07 13:52:45 +0100
commit371bf09ef7c9e518216348cedac7e175615aefc3 (patch)
treeb4e288ebff9a45c6b6674f679d5fa15d83678ad8 /net
parent18525691a4b86ceefd7627abb8744c1f4d4fb2f0 (diff)
parentbfd9789cb197c9d5e2fcba6023976c409172401e (diff)
downloadprosody-371bf09ef7c9e518216348cedac7e175615aefc3.tar.gz
prosody-371bf09ef7c9e518216348cedac7e175615aefc3.zip
Merge 0.11->trunk
Diffstat (limited to 'net')
-rw-r--r--net/http.lua5
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