commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ortwin Glück" <ortwin.glu...@nose.ch>
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.
</cite>

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.

dion@multitask.com.au 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 http://192.168.0.1?
> 
> 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]
                                    [www]      http://www.nose.ch
  ortwin glück                      [email] ortwin.glueck@nose.ch
  hardturmstrasse 171               [office]      +41-1-277 57 35
  8005 zurich                       [fax]         +41-1-277 57 12
  switzerland



--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message