Re: [squid-users] squid vport

From: Michael Lenaghan <michaell_at_dazzit.com>
Date: Tue, 29 Sep 2009 09:30:46 -0400

> "accel vhost defaultsite=192.168.24.198 vport=8080" means ...
>
> ... 'accelerate' the URL.
> ... (vhost) use client-given Host: header when available.
> ... (vport=) use the client-given Host: HTTP port (default 8088 if none
> found).
> ... (defaultsite=) use 192.168.24.198 if neither of the above give a usable
> domain/IP.
>
> So Squid check the URL. Finds /rdims/index.jsp.
> ... checks the Host: header. Finds 192.168.0.164:88, making
> URL=http://192.168.0.164:88/rdims/index.jsp
> ... checks the Host: header port. Finds 88, making
> URL=http://192.168.0.164:88/rdims/index.jsp
> ... has a domain '192.168.0.164', so skips defaultsite
>
> I think it should have been: "Host: 192.168.0.164:88" maybe something went
> wrong and caused defaultsite to be used. Henrik might know.

Amos, I only read a small portion of the code but I believe that if a
vport is *specified* it's *always* used.

This is 2.7:

            if (vport > 0)
                 port = vport;
             else
                port = htons(http->conn->me.sin_port);

(The 2.6 code is different but I believe it has a similar intent.)

Either way it would be great if the docs were more specific!

Something else that's confusing in the docs: Does accel have to be
specified if vhost, vport or defaultsite is given? Or are the docs
trying to say that those things have no effect unless accel is given?
Again, it would be great if the docs were clearer.
Received on Tue Sep 29 2009 - 13:30:51 MDT

This archive was generated by hypermail 2.2.0 : Wed Sep 30 2009 - 12:00:03 MDT