]> git.ipfire.org Git - thirdparty/squid.git/commit
Remove HTTP reply header completion hack (#910)
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Thu, 7 Oct 2021 21:44:45 +0000 (21:44 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sat, 9 Oct 2021 13:55:49 +0000 (13:55 +0000)
commita2897a3a55455e926e6a4488221a581f814d42b9
tree48c48f43540dc89622c343ee857fde44de9459ce
parent12f5a662baf7fa0e393fa8fea4af84ea3d0883b6
Remove HTTP reply header completion hack (#910)

Treat responses with truncated HTTP headers (i.e. no CRLF after all the
field-lines) as malformed, replacing them with an HTTP 502
ERR_INVALID_RESP error (same as any other HTTP response with malformed
headers would get).

Since Bug 2879 (commit da6c841 and earlier v2-only changes), Squid was
"fixing" such truncated headers by adding an extra CRLF sequence and
re-parsing them. Depending on the truncation circumstances, that old
workaround could result in rather bad outcomes for Squid and its
clients. Hopefully, we no longer need to work around such bugs. If we
do, we should do it in a safer manner and with admin permission.
src/http.cc