RE: Host header issue

> > b) not require that a server respond with an error if the Host
> >   header were missing (since HTTP/1.1 clients should only
> >   send absolute URIs to proxies.)
> > 
> I will double check, but my reading of the spec says that
> origin servers need to understand absoluteURIs.

Yes.

>  If they 
> receive an absolute URI, what is the point of requiring 
> a host header?

To insure that clients will send them, without a doubt,
since the client->server request is made without knowing
the compliance of the server its sending them to.

As was pointed out in a private communication, there might be
older proxies that would forward 

  GET http://example.com/path HTTP/1.1

to 'example.com' merely as
   GET /path HTTP/1.1

without adding a Host header. However, if the client supplies

   GET http://example.com/path HTTP/1.1
   Host: example.com

then the proxy would forward

   GET /path HTTP/1.1
   Host: example.com

So clients should send Host headers even with absolute
URLs when talking to proxies, which is the only time
they should send absolute URLs. So clients should send
Host headers always. So servers should insure that clients
are compliant by always requiring Host headers, even with
absolute URLs.

Larry

Received on Wednesday, 8 September 1999 21:48:58 UTC