hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stephen joseph butler" <stephen.but...@gmail.com>
Subject Re: HTTPS via the Upgrade header
Date Sun, 17 Feb 2008 07:15:41 GMT
On Feb 12, 2008 11:58 AM, stephen joseph butler
<stephen.butler@gmail.com> wrote:
> Hmmm... that's disappointing. But looking at the source, I might be
> able to hack it in myself. Basically, I want to do what is already
> done in HttpConnection#tunnelCreated(). So at least I know it's
> possible!
> Thanks for the information.

For anyone wondering how  solved my problem, here's the code I came up
with. In the end, I didn't have to modify any of the HttpClient code,
but my version isn't horribly robust. For instance, it only returns
upgraded sockets (which is fine for IPP), but won't understand an
upgrade request made via a user initiated method. Part of that problem
is that HttpClient discards any responses in the 100 range as being
irrelevant (from what I understand) to the success/failure of the
method. I don't know how 4.x is progressing, but some general way to
hook into the response stream and handle such requests would be nice.

Anyway, I didn't have to solve that problem to make my code work.
Class attached for the curious.

View raw message