atom feed8 messages in org.apache.hc.httpclient-usersRe: HTTP Response contains headers last
FromSent OnAttachments
Morris, ChrisSep 26, 2007 11:53 am 
Roland WeberSep 27, 2007 8:32 am 
Morris, ChrisSep 27, 2007 8:48 am 
Roland WeberSep 27, 2007 9:16 am 
Morris, ChrisSep 27, 2007 9:24 am 
Roland WeberSep 27, 2007 9:55 am 
Morris, ChrisSep 27, 2007 10:03 am 
Roland WeberSep 27, 2007 10:57 pm 
Subject:Re: HTTP Response contains headers last
From:Roland Weber (ossf@dubioso.net)
Date:Sep 27, 2007 8:32:51 am
List:org.apache.hc.httpclient-users

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