hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: [PATCH] HttpClient: possibility to specify port number in Host headers
Date Sat, 07 Jan 2006 10:27:36 GMT
On Fri, 2006-01-06 at 18:17 +0100, Ortwin Gl├╝ck wrote:
> 
> 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.
> 

Odi,

There is no such thing as a virtual port in the HTTP spec and we ought
not invent stuff. On top of that I personally do not see this feature to
be of any practical use. 

For a tiny minority of users that might find it useful this feature can
be easily added on top of HttpClient. In my opinion clearly does not
warrant inclusion into the stock version of HttpClient.

If you feel very strongly about it, feel free to take ownership of this
patch and include it into the 3.1 release. I will not veto it, but I
will respectfully remain -0 on it.

Cheers,

Evil Comrade Oleg



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


---------------------------------------------------------------------
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