--- a/net/http.lua Sat Oct 16 08:34:32 2010 +0500
+++ b/net/http.lua Sat Oct 16 23:00:42 2010 +0500
@@ -19,7 +19,7 @@
local t_insert, t_concat = table.insert, table.concat;
local pairs, ipairs = pairs, ipairs;
local tonumber, tostring, xpcall, select, debug_traceback, char, format =
- tonumber, tostring, xpcall, select, debug.traceback, string.char, string.format;
+ tonumber, tostring, xpcall, select, debug.traceback, string.char, string.format;
local log = require "util.logger".init("http");
@@ -46,10 +46,10 @@
end
local function expectbody(reqt, code)
- if reqt.method == "HEAD" then return nil end
- if code == 204 or code == 304 or code == 301 then return nil end
- if code >= 100 and code < 200 then return nil end
- return 1
+ if reqt.method == "HEAD" then return nil end
+ if code == 204 or code == 304 or code == 301 then return nil end
+ if code >= 100 and code < 200 then return nil end
+ return 1
end
local function request_reader(request, data, startpos)