net/http/parser.lua
changeset 10584 b7c5d7bae4ef
parent 10544 375d31225d53
child 11024 7076ed654ac9
equal deleted inserted replaced
10583:16099e8964d8 10584:b7c5d7bae4ef
    91 					end
    91 					end
    92 					if not first_line then error = true; return error_cb("invalid-status-line"); end
    92 					if not first_line then error = true; return error_cb("invalid-status-line"); end
    93 					chunked = have_body and headers["transfer-encoding"] == "chunked";
    93 					chunked = have_body and headers["transfer-encoding"] == "chunked";
    94 					len = tonumber(headers["content-length"]); -- TODO check for invalid len
    94 					len = tonumber(headers["content-length"]); -- TODO check for invalid len
    95 					if len and len > bodylimit then error = true; return error_cb("content-length-limit-exceeded"); end
    95 					if len and len > bodylimit then error = true; return error_cb("content-length-limit-exceeded"); end
       
    96 					-- TODO ask a callback whether to proceed in case of large requests or Expect: 100-continue
    96 					if client then
    97 					if client then
    97 						-- FIXME handle '100 Continue' response (by skipping it)
    98 						-- FIXME handle '100 Continue' response (by skipping it)
    98 						if not have_body then len = 0; end
    99 						if not have_body then len = 0; end
    99 						packet = {
   100 						packet = {
   100 							code = status_code;
   101 							code = status_code;