Re: Host headers for accelerator origins

From: Henrik Nordstrom <henrik_at_henriknordstrom.net>
Date: Fri, 18 Jul 2008 01:34:09 +0200

On ons, 2008-07-16 at 10:24 -0700, Mark Nottingham wrote:
> From what I can see on the wire, Squid 2.7 does not rewrite the Host
> header when sending a request to an origin server when running in
> vhost mode, and AFAICT there isn't any way to get it to rewrite to the
> cache_peer name.

Why would it? It's acting as a forwarder, not a rewriter. If we replaced
the host header then vhost mode generally wouldn't make much sense as
one would need one cache_peer per unique domain/hostname, not just one
per server..

2.6 didn't do this either. Neither did 2.5 when running in similar
httpd_accel_uses_host_header mode, but with 2.5 most forwarded requests
by rewriting the host part of the URL making a mess of things...

> Is this correct? If so, I might submit a patch to allow rewriting of
> the Host header on a per-peer basis...

You mean something like forceddomain=name

                     use 'forceddomain=name' to forcibly set the Host header
                     of requests forwarded to this peer. Useful in accelerator
                     setups where the server (peer) expects a certain domain
                     name and using redirectors to feed this domain name
                     is not feasible.

Regards
Henrik
Received on Thu Jul 17 2008 - 23:34:15 MDT

This archive was generated by hypermail 2.2.0 : Fri Jul 18 2008 - 12:00:06 MDT