hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <http-as...@dubioso.net>
Subject Re: HttpClient & custom host names resolving
Date Fri, 26 Jan 2007 21:52:59 GMT
Hello Erwan,

sorry for the late reply, we're currently a bit under water.

> specific DNS server selected based on the URL requested or any other
> parameter in the request
> I'm not sure i've made myself clear, but is there any other way i
> could plug my own SocketFactory at the HttpConnection level ?

I don't see how you could implement this requirement without
changing the source code. Even in HttpClient 3.x, the transport
layer is clearly separated from the HTTP layer. Even if you had
a different socket factory per connection, you wouldn't have
access to the request at the time the socket is connected.
Things get worse in the presence of connection keep-alive.

If I had to implement something like that, I'd probably start at
the HttpMethodDirector and would try to do the hostname resolving
there explicitly. By passing only IP-level addresses to the
connection manager and connections, you prevent those from doing
unwanted name resolutions.

hope that helps,

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

View raw message