]> git.ipfire.org Git - thirdparty/squid.git/commit - src/http/one/RequestParser.cc
Fix parser buffer accounting for dropped garbage bytes
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 4 Jan 2014 23:10:48 +0000 (15:10 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 4 Jan 2014 23:10:48 +0000 (15:10 -0800)
commitf9daf571dfe4687df25ad83cd0511d5e897ca708
tree2c989e970ae5c2e30a54788ed6893262faf8aa94
parent016a316b9407f0a1aebbd7e30c62be1e324e7dd5
Fix parser buffer accounting for dropped garbage bytes

The connection buffer shift/consume operation was relying on the message
size value in context to consume the correct number of bytes. Now that
the garbage is no longer counted as message header bytes it was not
being consumed.

The fix for consuming garbage and adjusting the parser buffer start
between parser calls not only fixes the garbage collection but can be
used in place of the indirect buffer consume calculation.

The ConnStateData parse method is now responsible for shifting/consuming
message header bytes in the buffer of emptying the buffer when connection
is to be aborted.
src/client_side.cc
src/http/Http1Parser.cc
src/http/Http1Parser.h