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, SOCKS proxy, and webstart
Date Sat, 20 Jan 2007 15:57:42 GMT
Hi Mark,

> I have been having some trouble with HttpClient and the SOCKS proxy.  My
> path to where I am now is a long and sorted tale, so here is my summary:
> 
> Webstart gets its proxy settings from the Windows default browser

Your problem is a new twist to the "proxy configuration" discussion in
the application design FAQ:
http://wiki.apache.org/jakarta-httpclient/FrequentlyAskedApplicationDesignQuestions

Unlike HTTP proxy settings, SOCKS is not directly in scope for HttpClient:
http://wiki.apache.org/jakarta-httpclient/ForAbsoluteBeginners#head-e5df784207b3082d88f0c254a0b656275c2b2855

> I am not sure if this is a bug in Firefox, in the default SocketFactory, or
> in HttpClient.

It's a bug in Webstart, or in the Firefox/Webstart interaction. I don't know
whether Webstart can determine whether Firefox's checkbox is set

> What I want to know is how to work around this.
> 
> HttpURLConnection seems to create its sockets from sun.net.NetworkClient and
> not a SocketFactory, which apparently makes it immune to this problem

I don't see how we could work around this in HttpClient. However, socket
creation in HttpClient is explicitly encapsulated in SocketFactories:
http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/protocol/ProtocolSocketFactory.html

Maybe you can implement your own socket factory which calls
sun.net.NetworkClient? If it is possible, and if you can live
with calling SUN internal classes, that should make your app
immune to this problem as well.

hope that helps,
  Roland




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


Mime
View raw message