]> git.ipfire.org Git - thirdparty/squid.git/commit
Fix handling of tiny invalid responses (#422)
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Sun, 23 Jun 2019 14:14:47 +0000 (14:14 +0000)
committerAmos Jeffries <yadij@users.noreply.github.com>
Thu, 4 Jul 2019 11:01:16 +0000 (23:01 +1200)
commite8121b2281301d4704129d81ecfdca959611c333
treeac62100f42778e814c95f2bba8fef67af9411e4b
parenta1d1611c2762f821b0751e0b2004c22b626801e1
Fix handling of tiny invalid responses (#422)

Squid converted any invalid response shorter than 4 bytes into an
invalid "HTTP/1.1 0 Init" response (with those received characters and a
CRLFCRLF suffix as a body). In some cases (e.g., with ICAP RESPMOD), the
resulting body was not sent to the client at all.

Now Squid handles such responses the same way it handles any non-HTTP/1
(and non-ICY) response, converting it into a valid HTTP/200 response
with an X-Transformed-From:HTTP/0.9 header and received bytes as
a message body.
src/HttpReply.cc
src/http/one/ResponseParser.cc