]> git.kaiwu.me - haproxy.git/commit
MAJOR: http/compression: fix chunked-encoded response processing
authorWilly Tarreau <w@1wt.eu>
Thu, 17 Apr 2014 22:20:14 +0000 (00:20 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 22 Apr 2014 21:15:28 +0000 (23:15 +0200)
commit7f2f8d5cc38ecb12f57b060380049f0b2a34406c
tree7e04e6a21c85213e92437f2ac08ca43086c14169
parent5fb0abd9a1c53639c62c0cf9fb0a3ea9e08b92dd
MAJOR: http/compression: fix chunked-encoded response processing

Now we have valid buffer offsets, we can use them to safely parse the
input and only forward when needed. Thus we can get rid of the
consumed_data accumulator, and the code now works both for chunked and
content-length, even with a server feeding one byte at a time (which
systematically broke the previous one).

It's worth noting that 0<CRLF> must always be sent after end of data
(ie: chunk_len==0), and that the trailing CRLF is sent only content
length mode, because in chunked we'll have to pass trailers.
src/compression.c
src/proto_http.c