Software /
code /
prosody
Diff
net/http/parser.lua @ 7635:6879a220917b
net.http.parser: Don't collapse buffer when expecting a chunk and not enough data has been received
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 26 Aug 2016 16:42:14 +0200 |
parent | 7634:b1132d74f54c |
child | 8045:55a56dc935f2 |
line wrap: on
line diff
--- 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;