accelerator and squid-2.2.STABLE5.ignore_host_header.patch

From: Miquel van Smoorenburg <list-squid@dont-contact.us>
Date: 15 Dec 1999 23:35:31 GMT

Hello [Henrik ;)]

It seems that the squid-2.2.STABLE5.ignore_host_header.patch from
Henrik and the HTTP accelerator functionality don't go together well.

I have one machine at 195.64.65.21 that has a lot of named virtual
hosts running on it, and I want to put squid in front of it as an
HTTP accelerator. However with the ignore_host_header.patch, the
Host: header is always stripped and this doesn't work anymore.

Now this is easy to fix in 2 ways:

1. Make it so that the Host: header is always used if it is an
   accelerator request

        case HDR_HOST:
            if ((request->flags.redirected && !Config.onoff.redir_rewrites_host)
                || request->flags.accelerated)
                httpHeaderAddEntry(hdr_out, httpHeaderEntryClone(e));

2. Make it so that the Host: header is used if it is an accelerator
   request AND redir_rewrites_host is off

        case HDR_HOST:
            if (!Config.onoff.redir_rewrites_host &&
                (request->flags.accelerated || request->flags.redirected))
                httpHeaderAddEntry(hdr_out, httpHeaderEntryClone(e));

Now I don't quite understand what redir_rewrites_host is for
exactly. The comments in squid.conf indicate that you want it on
for a normal squid cache and off for an accelerator. Do we want
to keep this configurable (so implement [1]) or do we want to
turn it on for normal requests and off for accelerator requests
(so implement [2] and perhaps even remove the redir_rewrites_host
alltogether)

What would be the best option to implement ?

Mike.

-- 
The From: and Reply-To: addresses are internal news2mail gateway addresses.
Reply to the list or to miquels@cistron.nl (Miquel van Smoorenburg)
Received on Wed Dec 15 1999 - 16:43:17 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:49:54 MST