[squid-users] [PATCH] fix transparent caching when squid listens on non-80 port

From: Denis Vlasenko <vda@dont-contact.us>
Date: Thu, 13 Jan 2005 16:27:27 +0000

Squid uses destination port of incoming request
in order to determine dst port for it's own request
if vport is used. This is handled correctly for
case where there is no "Host:" header in user
request. However, if there *IS* a "Host:" header
without explicit :port spec, squid does not check
whether port was translated by NAT before reaching
squid.

This will work if your squid listens on port 80, but
in my case, it was on 9080, causing all requests to go
to port 9080 too on origin servers 8(

Patch fixes this. Fix for LINUX_NETFILTER only, sorry.

Patch also fixes missing "\n" in debug print and
optimizes "http->conn" into "conn" because they
are equal throughout affected function.

Patch developed and tested on STABLE1, rediffed
to STABLE7.

--
vda

Received on Thu Jan 13 2005 - 07:29:13 MST

This archive was generated by hypermail pre-2.1.9 : Mon Mar 07 2005 - 12:59:35 MST