hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <ROLWE...@de.ibm.com>
Subject RE: HttpClient, SOCKS proxy, and webstart
Date Tue, 23 Jan 2007 17:28:08 GMT
Hi Mark,

> The class sun.net.NetworkClient just basically creates a new socket via
> Socket() or Socket(Proxy p).  Inefficiencies aside, could I just create 
> SocketFactory that just creates a new socket every time?

Yes you could. Efficiency is not a problem, you'll have to create a
new Socket object anyway.

> Since it seems
> that HttpClient manages the proxies and all that, it seems I would not 
> to bother with that.

You do need to bother. HttpClient expects to be *told* which proxy to
use. That's for HTTP proxies. If "and all that" refers to SOCKS proxies,
HttpClient does not do anything with them. This has to be handled in the
socket factories. IIRC, standard sockets will pick up SOCKS settings
that are passed to the JVM as system properties. But I don't know what
else happens in web start.
The feature of web start to determine browser settings for SOCKS and
HTTP proxies is supposed to make your life easier. Unfortunately that
happens only if you use HttpURLConnection. I have no idea how you could
get to the browser settings for HTTP proxy in web start. If you find
something out, please let us know.

hope that helps,

View raw message