Software /
code /
prosody
Comparison
net/http/parser.lua @ 10580:b7c5d7bae4ef
net.http.parser: Add TODO related to #726
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 01 Jan 2020 01:22:57 +0100 |
parent | 10540:375d31225d53 |
child | 11020:7076ed654ac9 |
comparison
equal
deleted
inserted
replaced
10579:16099e8964d8 | 10580: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; |