[squid-users] Squid proxy will forward message with 'alternating host header' but logs another?

Amos Jeffries squid3 at treenet.co.nz
Thu Oct 31 09:03:58 UTC 2019


On 31/10/19 8:48 pm, Mark Bergman wrote:
> Can i stop squid from 'repairing' host headers?

Yes.

For context:

RFC 7230 :

"If the target URI includes an authority component, then a
   client MUST send a field-value for Host that is identical to that
   authority component"

"If the target URI includes an authority component, then a
   client MUST send a field-value for Host that is identical to that
   authority component"

"A server MUST respond with a 400 (Bad Request) status code to any
   HTTP/1.1 request message that ... contains ... a
   Host header field with an invalid field-value."


When the host_verify_strict directive is set to "on" then Squid will
produce a 4XX status code to any traffic received with invalid Host
headers. A Host header that conflicts with info in the URL is always
invalid.

Amos


More information about the squid-users mailing list