equal
deleted
inserted
replaced
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; |