Diff

net/http.lua @ 633:fe1e01a06729

Fix nil status code for http request callbacks
author Matthew Wild <mwild1@gmail.com>
date Mon, 22 Dec 2008 22:01:49 +0000
parent 628:3712d36b6d25
child 646:90da4c9b34b5
line wrap: on
line diff
--- a/net/http.lua	Mon Dec 22 13:29:59 2008 +0000
+++ b/net/http.lua	Mon Dec 22 22:01:49 2008 +0000
@@ -81,7 +81,7 @@
 			return request.callback(0, "invalid-status-line", request);
 		end
 		
-		request.responsecode, request.responseversion = code, http;
+		request.code, request.responseversion = code, http;
 		
 		if request.onlystatus or not expectbody(request, tonumber(code)) then
 			if request.callback then