diff options
author | Kim Alvefur <zash@zash.se> | 2017-04-02 00:24:37 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-04-02 00:24:37 +0200 |
commit | d6f2c308a4151199c34d3baeb910f40c64d55be8 (patch) | |
tree | 5749f7a93bf1a098085221f3bbcde3c238c778d5 /net/http.lua | |
parent | 75ed409006e229b29beeaff5807f227ace290eef (diff) | |
parent | 3811ceb6cac48480c300c6ed09dc555e5cec754d (diff) | |
download | prosody-d6f2c308a4151199c34d3baeb910f40c64d55be8.tar.gz prosody-d6f2c308a4151199c34d3baeb910f40c64d55be8.zip |
Merge 0.10->trunk
Diffstat (limited to 'net/http.lua')
-rw-r--r-- | net/http.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/http.lua b/net/http.lua index dcf94bdd..2fd46db9 100644 --- a/net/http.lua +++ b/net/http.lua @@ -68,7 +68,7 @@ end function listener.ondisconnect(conn, err) local request = requests[conn]; if request and request.conn then - request:reader(nil, err); + request:reader(nil, err or "closed"); end requests[conn] = nil; end @@ -126,7 +126,7 @@ local function request(u, ex, callback) local req = url.parse(u); if not (req and req.host) then - callback(nil, 0, req); + callback("invalid-url", 0, req); return nil, "invalid-url"; end @@ -190,7 +190,7 @@ local function request(u, ex, callback) local handler, conn = server.addclient(host, port_number, listener, "*a", sslctx) if not handler then - callback(nil, 0, req); + callback(conn, 0, req); return nil, conn; end req.handler, req.conn = handler, conn |