]> git.ipfire.org Git - thirdparty/squid.git/commit
Bug 2976: squid reports ERR_INVALID_URL for transparently captured requests when...
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Mon, 18 Jun 2012 15:43:05 +0000 (18:43 +0300)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Mon, 18 Jun 2012 15:43:05 +0000 (18:43 +0300)
commit60b2e9199b00d20dc69497c92f8d8bb2d624921a
tree5c66ea1ed73ee0a63bdc20095a5aeeacb55cc66e
parentc0f81932e3f80dd3e81c15d8cb81e516872d0a31
Bug 2976: squid reports ERR_INVALID_URL for transparently captured requests when reconfiguring

During reconfigure the configured AnyP::PortCfg objects in http_port_list
may deleted so it is not safe to use them while processing Http requests.
For this reason inside prepareTransparentURL (file client_side.cc) function
the protocol was hard-coded to "http" instead of read it from the related
AnyP::PortCfg object.
But this is breaks the intercepted https traffic.

This patch:
  1. Inside prepareTransparentURL read the protocol from the related
     AnyP::PortCfg object
  2. add_http_port() locks the new port pointer before linking it.
  3. parsePortCfg() locks the new port pointer before linking it.
  4. free_PortCfg() unlock the old port pointer before unlinking
     it. It does not delete the old pointer.

This patch also discussed in squid-dev user mailing list in
 "Re: [PATCH] Squid host rewrite for intercepted https requests"
thread.

This is a Measurement Factory project
src/cache_cf.cc
src/client_side.cc