# HG changeset patch # User Kim Alvefur # Date 1472222534 -7200 # Node ID 6879a220917b9af4fb84b210434f74c85d8235f5 # Parent b1132d74f54c411557128468554157fc1d98c5a6 net.http.parser: Don't collapse buffer when expecting a chunk and not enough data has been received diff -r b1132d74f54c -r 6879a220917b net/http/parser.lua --- a/net/http/parser.lua Fri Aug 26 16:39:04 2016 +0200 +++ b/net/http/parser.lua Fri Aug 26 16:42:14 2016 +0200 @@ -134,6 +134,9 @@ 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;