aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2011-08-20 15:08:21 -0400
committerMatthew Wild <mwild1@gmail.com>2011-08-20 15:08:21 -0400
commit4158a96b3a294beda82cd2eb68d26efdf779ed4d (patch)
tree29c9292a43030927a3941f6f4ea255758e46ce15
parentcd13e57e20419bc555dd599b52b25b058675efd3 (diff)
downloadprosody-4158a96b3a294beda82cd2eb68d26efdf779ed4d.tar.gz
prosody-4158a96b3a294beda82cd2eb68d26efdf779ed4d.zip
net.http: Small fix to prevent traceback when connection fails before sending the request
-rw-r--r--net/http.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/http.lua b/net/http.lua
index 5b9831ac..c37288fe 100644
--- a/net/http.lua
+++ b/net/http.lua
@@ -61,6 +61,7 @@ end
local function request_reader(request, data, startpos)
if not request.parser then
+ if not data then return; end
local function success_cb(r)
if request.callback then
for k,v in pairs(r) do request[k] = v; end