dIon,
Thanks for the response. Let me at least partially answer my own question #2.
2. HttpClient does, in fact, support proxying (with a few caveats). You get
SOCKS support for free by setting the system properties socks.proxyHost and
socks.proxyPort and NOT setting the proxyHost and proxyPort in HttpConnection.
Non-SOCKS proxying works for HTTP but not HTTPS. Ari Luotonen outlines the
reasons why in his draft document "Tunneling TCP based protocols through Web
proxy servers" at
http://www.web-cache.com/Writings/Internet-Drafts/draft-luotonen-web-proxy-tunneling-01.txt.
So, it is necessary to "tunnel" through the proxy server. Pua Yeow Cheong had an
"Tips 'N Tricks" article in JavaWorld
(http://www.javaworld.com/javaworld/javatips/jw-javatip111_p.html) that covers
this as does the following post in Sun's Java Developer Connection -
http://forum.java.sun.com/thread.jsp?forum=2&thread=172538. It seems like it
should be possible to add getter/setter methods to HttpConnection for a property
that specifies an alternative SSLSocketFactory. I haven't had the time to try it
yet.
dIon Gillard wrote:
> Bill Cutshall wrote:
>
> >I just discovered Http Client about a week ago. It's just what I need
> >for a project that I'm working on. I have a few questions, though:
> >
> >1. In message
> >http://www.mail-archive.com/commons-dev@jakarta.apache.org/msg03518.html
> >Rodney intimates that that Http Client is close to being a 2.0 release.
> >How close is it to being officially released?
> >
> As close as Rodney, or another committer coming up with a release plan.
>
> >2. Does Http Client support SOCKS proxies? Which of the system
> >properties (e.g., socks.proxyHost, socks.proxyPort) do I need to set for
> >both SOCKS and non-SOCKS proxies?
> >
> Don't know for sure....can check if you don't want to scour the source.
>
> >3. Part of my application needs to download binary files. I currently
> >do it in a loop "read"ing bytes from a BufferedInputStream chained to a
> >URLConnection's InputStream. I tried a similar approach with
> >HttpConnection's ResponseInputStream but the BufferedInputStream returns
> >eof (-1) on the first read. PostMethod.getResponseBody seems to work
> >fine but was slower than my current implementation. Can anyone give me
> >a good approach for binary file download?
> >
> I can't help on this one....anyone else?
>
> >
> >Thanks,
> >
> >Bill Cutshall
> >Carnegie Technology Education
> >wrc@carnegietech.org
> >
> --
> dIon Gillard, Multitask Consulting
> http://adslgateway.multitask.com.au/developers
>
> --
> To unsubscribe, e-mail: <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>
--
To unsubscribe, e-mail: <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>
|