Changeset

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
parents 4349:16fd8061964e
children 4351:3f414091a008
files net/http.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
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