]> git.ipfire.org Git - thirdparty/squid.git/commit
Bug 419: Hop by Hop headers MUST NOT be forwarded (attempt 2)
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 20 Jan 2009 08:51:04 +0000 (21:51 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 20 Jan 2009 08:51:04 +0000 (21:51 +1300)
commit9e498bfb7644c3fc2fa349393460c12097fe4472
treebe8d8146deea2c343d7456e6b2a1aaf4848e9c5e
parent626119ce6ae8cb032aa8ea95b38cbca67fd6626d
Bug 419: Hop by Hop headers MUST NOT be forwarded (attempt 2)

This attempt builds on Henriks re-work of the client-request to
server-request cloning done since the last attempt was made at closing
this bug.

Adds all RFC 2616 listed Hop-by-hop headers to the clone selection test
as 'ignore' cases unless otherwise handled already.

The test for whether they exist in Connection: is moved to the default
case as an inline. Which reduces the code a fair bit and prevents the
side case where a specially handled header gets ignored because the
client explicitly added it to Connection: when it did not have to.

This method sets up a background default of not passing the hop-by-hop
headers while allowing any code which explicitly sets or copies the
headers across to operate as before without interference.
src/HttpHeaderTools.cc
src/HttpRequest.cc
src/http.cc