Improve the handling of chunk-encoded responses
authorFabian Keil <fk@fabiankeil.de>
Mon, 29 Mar 2021 09:44:35 +0000 (11:44 +0200)
committerFabian Keil <fk@fabiankeil.de>
Fri, 6 May 2022 10:39:55 +0000 (12:39 +0200)
commitcaacb81062e2e3152231c09c9da62a31e4efc170
treecf5a5e4f87f69f007a85cb545d00836a27f6432c
parenta057c133f3d65c4136f39938c73c9c85ee33d7a1
Improve the handling of chunk-encoded responses

... by buffering the data even if filters are disabled and
properly keeping track of where the various chunks are supposed
to start and end.

Previously Privoxy would merely check the last bytes received
to see if they looked like the last-chunk.

This failed to work if the last-chunk wasn't received in one
read and could also result in actual data being misdetected
as last-chunk.

Should fix: SF support request #1739
Reported by: withoutname
filters.c
filters.h
jcc.c