We embed HttpClient in our product (SOAPscope), and some of our users have
reported a problem accessing https URLs if they use a proxy server.  I tried
this, and can readily recreate the problem (I'm using Squid).  I used
TcpTrace to capture one of these requests, and compared it to the same
request peformed by FireFox.  The FireFox request gets becomes a CONNECT
before it gets sent to the proxy, and it works fine.  But the equivalent
request from HttpClient just goes through as a GET and fails (since Squid
won't handle a GET over https.
 
What's the best way for me to fix this?  Should HttpClient handle the
conversion from GET or POST to CONNECT, or do I have to handle it myself in
my client code (i.e., use ConnectMethod instead of PostMethod or GetMethod,
based on isSecure() && isProxied())?
 
- Dave Seidel, Mindreef, Inc.

Reply via email to