]> git.ipfire.org Git - thirdparty/squid.git/commit
Do not log error:transaction-end-before-headers after invalid requests.
authorAlex Rousskov <rousskov@measurement-factory.com>
Fri, 19 Aug 2016 02:32:01 +0000 (20:32 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Fri, 19 Aug 2016 02:32:01 +0000 (20:32 -0600)
commitfc10bc7dfd9d86e25804dbe9c90146054465b218
tree14ebad819c1da562b865c663e5eba3706dea0ac2
parentd747ab5464eb361c7bdcb8c0062c5c19df2691bc
Do not log error:transaction-end-before-headers after invalid requests.

Squid was not consuming read leftovers after failing to parse a request.
Starting with r14752, those leftovers were misinterpreted as another
unparsed request, creating an extra error:transaction-end-before-headers
access.log line after every error:invalid-request line (and probably
after every error:request-too-large line).

To stop Squid from accidentally reading new bytes and misinterpreting
them as another request, I was tempted to also clear flags.readMore
after consuming unparsable leftovers. In my tests, the flag is cleared
in ConnStateData::quitAfterError() called from clientTunnelOnError(),
but that logic looks rather fragile. I resisted the temptation to
improve it because controlling reads is a complicated matter (especially
in on_unsupported_protocol context) outside this logging fix scope.
src/client_side.cc