AlliumPorrum wrote:
> Server: Sun-Java-System/Application-Server
> Date: Wed, 07 Nov 2007 17:44:10 GMT
> Content-Type: text/html; ISO-8859-1;charset=ISO-8859-1
> X-powered-by: Servlet/2.4
> Transfer-Encoding: chunked
> 200 OK

I have no idea how someone manages to send non-chunked data
through the Servlet API, when the container is supposed to
chunk-encode the response data. But the Content-Type looks
fishy too, so somebody seems to have messed up badly.

> So, the server really claims to use "chunked" messages. But the question now
> is; how can I solve this problem in the HTTP client side, because the server
> isn't made by me??

I'm afraid you'll have to hack into the HttpClient source code
and change the interpretation of the Transfer-Encoding header.
That's in HttpMethodBase.readResponseBody(HttpConnection). Maybe
you can simply add some code that deletes the Transfer-Encoding
header before that method is called. But you must only do that
if the response is coming from that broken server, otherwise
you'll screw things up for servers that work correctly.

cheers,
  Roland

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to