Here's the situation for which we want to use virtual port numbers:
We use a load balancer that connects to the HTTP server and the HTTP server
connects to the application server. We use port translation in our load
balancer. So when e.g. a client connects to 90 of the load balancer, the load
balancer connects to port 100 of the HTTP server. The load balancer doesn't
change the Host request header, so in the host request header is still the
original virtual host name and port, in this case port 90. For this reason, the
virtual hosts of the HTTP server and application server are configured based on
the external port numbers, so in this case port 90.
For test purposes, we sometimes want to connect directly to the HTTP server or
the application server, bypassing the load balancer. To do this, we need to
connect to the same port as the load balancer would, in this example port 100,
but the host header of this request should be the same as if the request would
go through the load balancer, so in this example port 90, because the HTTP
server and application server's virtual hosts are configured for this port.
Jasper
-----Oorspronkelijk bericht-----
Van: Ortwin Glück [mailto:[EMAIL PROTECTED]
Verzonden: za 7-1-2006 13:31
Aan: HttpClient Project; Jasper van Zandbeek
CC:
Onderwerp: Re: [PATCH] HttpClient: possibility to specify port number
in Host headers
Jasper,
We currently do not understand why this feature is important to you.
Could you please take a moment and explain your situation.
Thanks
Ortwin Glück
Oleg Kalnichevski wrote:
> 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