hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jani Mattsson <jani.matts...@hotelzon.com>
Subject Having problems with HTTPS proxy tunneling
Date Thu, 27 Feb 2003 12:49:29 GMT
I am using commons-httpclient in a setup where I'm making connections to a
secure HTTPS server over a proxy server. I use POST-requests, and the first
request always works fine (albeit a bit slow because of SSL handshaking or
something). Subsequent request work fine if I do them soon enough after
the first request, but if there's been a longer pause I seem to run into
The cause of the trouble seems to be either the remote HTTPS server or my
local proxy server (do not know which) dropping the tunneling connection
that httpclient creates during the first request. The results of which seem
vary: sometimes HttpClient.executeMethod() throws a HttpRecoverableException

to me, sometimes a java.net.SocketException is thrown somewhere down in the
call (HttpMethodBase.writeRequestHeaders there somewhere along the line)
and HttpClient tries a retry on its own. I get around the first case by just
a new PostMethod instance and retrying the very same request with it, works
fine, but I'm stuck right now with the second case. It seem HttpClient won't
try tunneling another time but just sends a 
"POST https://remote.host.com/foo/bar <https://remote.host.com/foo/bar>
HTTP/1.1" request to I do not know
whom (my proxy or the remote server?), gets a "HTTP/1.0 200 OK" response
and then nothing more.
I do not know if the problem is with HttpClient or with either uncompliant
or remote server.
Is there any way to turn any tunneling off altogether to see if the first
request would succeed in non-tunneling proxy mode? (I do not know the
details of the HTTPS proxying protocol, but I suppose the tunneling is
Any other ideas/hints about this?
All help is highly appreciated.
Best regards,
Jani Mattsson

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message