hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <ossf...@dubioso.net>
Subject Re: HTTP Response contains headers last
Date Thu, 27 Sep 2007 15:32:51 GMT
Morris, Chris wrote:
> I'm working with an API that returns the HTTP Response Headers after the
> response body.  This confuses the HTTPClient and PostMethod into
> thinking that there is no body.

We have code to handle footers in ChunkedInputStream. However,
this is the first time that I encounter footers in the wild,
so maybe that code is buggy. Could you please post a wire log,
including headers and content? Feel free to obfuscate any
sensitive information and cut the contents.
http://jakarta.apache.org/httpcomponents/httpclient-3.x/logging.html

> Is there a way for me to get direct
> access to the response input stream so that I can parse it out myself?

You can hack through the code of course. The socket's stream
is not accessible directly, because the ChunkedInputStream has
to parse the "chunked" encoding. Trailers are only allowed with
chunked encoding. If you have to hack through the code anyway,
you should rather fix what is broken than work around what is
already there.

> The information contained in this communication is
> confidential, and is intended only for the sole use of
> the recipient named above. [...]

Always funny to read these footers on mails sent to public
mailing lists...

cheers,
  Roland


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message