Diff

net/http.lua @ 4350:0b9ed126286e

net.http: Small fix to prevent traceback when connection fails before sending the request
author Matthew Wild <mwild1@gmail.com>
date Sat, 20 Aug 2011 15:08:21 -0400
parent 4338:5d5d6c6d121a
child 4351:3f414091a008
line wrap: on
line diff
--- a/net/http.lua	Sat Aug 20 15:06:14 2011 -0400
+++ b/net/http.lua	Sat Aug 20 15:08:21 2011 -0400
@@ -61,6 +61,7 @@
 
 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