You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Alexei Kosut <ak...@nueva.pvt.k12.ca.us> on 1997/01/23 06:06:56 UTC

Host header

Two notes regarding the Host: header:

1) Someone asked recently about a list of browsers that sent the Host:
header. I recently came across a web page at
<http://www.opendoor.com/homedoor/homedoorbrowserlist.html> that seems
to provide that sort of information. Maybe it's useful for someone.

(wow; now *here's* a User-Agent:)
Mozilla/2.0 (compatible; PlanetWeb/1.011 Golden; SEGA Saturn; TV; 640,480)

2) As Roy pointed out a month or so ago, we really should be sending
"Vary: Host" when we have Host-based virtual servers. Although the
HTTP spec is pretty clear in implying this is neccessary, my problem
with it is mainly that a minimally HTTP/1.1-compliant proxy will
probably simply not cache anything with a Vary: header (the spec
actually reccomends this, I believe), whereas in this case, there's no
reason really not to.

And, to be HTTP/1.1-compliant, we'd have to send Vary: Host for every
response, even those not based on the Host: header (because they're
contingent on the lack of it, which is the same as it being
there). Even if the server isn't configured to use any Host-based
servers explictly (since Apache will allow *any* of its virtual
servers to be called by a request to the main server with a Host:
header).

Anyone have any ideas? We should solve this before 1.2.0.

-- 
________________________________________________________________________
Alexei Kosut <ak...@nueva.pvt.k12.ca.us>      The Apache HTTP Server
URL: http://www.nueva.pvt.k12.ca.us/~akosut/   http://www.apache.org/


Re: Host header

Posted by Brian Behlendorf <br...@organic.com>.
On Wed, 22 Jan 1997, Alexei Kosut wrote:
> Two notes regarding the Host: header:
> 
> 1) Someone asked recently about a list of browsers that sent the Host:
> header. I recently came across a web page at
> <http://www.opendoor.com/homedoor/homedoorbrowserlist.html> that seems
> to provide that sort of information. Maybe it's useful for someone.

I was actually thinking of, for Hyperreal's host-based-vhost sites, creating a
CGI script tied to the "default" server config's root index.cgi which tested
for the existance of the Host: header, and if it wasn't present give back a
page detailing 1) a list of all vhosted pages with subdir links to each of
them, and 2) a strong urge to upgrade their browser, with a complete list of
browsers supporting the Host: header.  Others may not like this shotgun
approach, but there's been so much confusion over it recently with my
userbase... anyways...

> 2) As Roy pointed out a month or so ago, we really should be sending
> "Vary: Host" when we have Host-based virtual servers. Although the
> HTTP spec is pretty clear in implying this is neccessary, my problem
> with it is mainly that a minimally HTTP/1.1-compliant proxy will
> probably simply not cache anything with a Vary: header (the spec
> actually reccomends this, I believe), whereas in this case, there's no
> reason really not to.
> 
> And, to be HTTP/1.1-compliant, we'd have to send Vary: Host for every
> response, even those not based on the Host: header (because they're
> contingent on the lack of it, which is the same as it being
> there). Even if the server isn't configured to use any Host-based
> servers explictly (since Apache will allow *any* of its virtual
> servers to be called by a request to the main server with a Host:
> header).
> 
> Anyone have any ideas? We should solve this before 1.2.0.

If I had been paying attention in class when this was covered, I probably would
have said there are probably some headers which should *always* be considered
as part of the proxy's lookup key, and that the Host: header would be part of
that, because sending "Vary: Host" on every response is 12 bytes more than I
normally would, or 24 extra megabytes with the kind of traffic Organic has been
doing recently.  Can anyone cite a legitimate situation where it makes sense
not to have the proxy server incorporate "Host:" into its lookup key?  The only
software paying attention to Vary: will be 1.1 software which presumably will
also be sending the Host: header if one didn't exist, and
http://www1.starwars.com/ and http://www.starwars.com/ would be different keys
anyways. Does an HTTP/1.1 (or 1.0) compliant piece of software (client or
proxy) ever send a Host: header of x.y.z for a URL of http://a.b.c/? 

So, I guess I'm saying, telling a proxy to vary on the Host: header is
pointless, it should be doing that anyways no matter what.  

	Brian

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com  www.apache.org  hyperreal.com  http://www.organic.com/JOBS