hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ortwin Gl├╝ck <...@odi.ch>
Subject Re: [PATCH] HttpClient: possibility to specify port number in Host headers
Date Fri, 06 Jan 2006 17:17:23 GMT


Oleg Kalnichevski wrote:
>>What would you call the optional port in the Host header then? If the 
>>server was able to figure that out on its own it would not be necessary.
>>
> 
> 
> The explicit port in the Host header is used in case the target port number
> is not equal to that of the default protocol port
> 

Oleg,

If I interprete the specs correctly it does not matter on which port the 
server actually listens. The request processor may be so "far" 
(architecture wise) away from the TCP connection that it does not even 
know the port on which the connection came in. Maybe the request even 
came in over a pipe and not a TCP socket at all.

In any case the two requests

GET / HTTP/1.1
Host: jakarta.apache.org

and

GET / HTTP/1.1
Host: jakarta.apache.org:100

issued to the same server instance (running on port 80 for example), 
request *different documents*. I admit, this may be sound esoteric and 
the second request is not even possible with a normal web browser.

A possible application scenario I can see is static NAT:

            Client
              |
NAT        port 80
              |
Apache     port 100

In this setup the web server would expect port 100 in the Host header. 
But the client would normally send port 80. The client could now use the 
"virtual" port 100. Of course such a setup is flawed, but possible.

Odi

PS. Forget about the ProxyPass directive. Maybe it's really a bad example.

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org


Mime
View raw message