commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ortwin Glück" <>
Subject Re: [Fwd: [HttpClient][PATCH] Correction to addHostRequestHeader +minor formatting cleanups]
Date Thu, 11 Jul 2002 13:55:37 GMT
The intent of the Host header is virtual hosts. A server can not 
determine the virtual host (assuming all virtula hosts use the same IP) 
if you specify a IP address instead of a host name.

<cite from="RFC2068">
    This allows the origin server or gateway to
    differentiate between internally-ambiguous URLs, such as the root "/"
    URL of a server for multiple host names on a single IP address.

An IP address in the Host header is pointless for this reason und should 
not be allowed by the client (in strict mode). This also means that 
requests with unknown host names must use HTTP/1.0. But I consider this 
the responsibility of the user.

How do web browsers handle this if you enter a IP into the address bar? 
Maybe they just fall back to HTTP/1.0? The server still has the option 
to return a not-found or bad-request status or similar. wrote:
> I don't see how an IP address can't be considered an internet hostname. 
> What if I send a GET / HTTP/1.1 to
> If the hostname isn't part of the uri and it isn't the IP address, it 
> should be left blank and the GET / would fail, right?

  NOSE applied intelligence ag      [perspectix-nose digital b.i]
  ortwin glück                      [email]
  hardturmstrasse 171               [office]      +41-1-277 57 35
  8005 zurich                       [fax]         +41-1-277 57 12

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message