aboutsummaryrefslogtreecommitdiffstats
path: root/net/http/parser.lua
diff options
context:
space:
mode:
Diffstat (limited to 'net/http/parser.lua')
-rw-r--r--net/http/parser.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/http/parser.lua b/net/http/parser.lua
index 493ff3a9..96d32ec8 100644
--- a/net/http/parser.lua
+++ b/net/http/parser.lua
@@ -134,6 +134,9 @@ function httpstream.new(success_cb, error_cb, parser_type, options_cb)
if state then -- read body
if client then
if chunked then
+ if chunk_start and buflen - chunk_start - 2 < chunk_size then
+ return;
+ end -- not enough data
if buftable then buf, buftable = t_concat(buf), false; end
if not buf:find("\r\n", nil, true) then
return;