Comparison

net/http/parser.lua @ 5303:19a4a3462574

Merge 0.9->trunk
author Waqas Hussain <waqas20@gmail.com>
date Tue, 22 Jan 2013 08:30:38 +0500
parent 5291:01f7522049fb
child 5322:8d525f58f916
comparison
equal deleted inserted replaced
5285:19381ed1cc02 5303:19a4a3462574
75 method, path, httpversion = line:match("^(%w+) (%S+) HTTP/(1%.[01])$"); 75 method, path, httpversion = line:match("^(%w+) (%S+) HTTP/(1%.[01])$");
76 if not method then error = true; return error_cb("invalid-status-line"); end 76 if not method then error = true; return error_cb("invalid-status-line"); end
77 end 77 end
78 end 78 end
79 end 79 end
80 if not first_line then error = true; return error_cb("invalid-status-line"); end
80 len = tonumber(headers["content-length"]); -- TODO check for invalid len 81 len = tonumber(headers["content-length"]); -- TODO check for invalid len
81 if client then 82 if client then
82 -- FIXME handle '100 Continue' response (by skipping it) 83 -- FIXME handle '100 Continue' response (by skipping it)
83 if not have_body then len = 0; end 84 if not have_body then len = 0; end
84 packet = { 85 packet = {