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: java.io.IOException: Bad chunk size??
Date Wed, 07 Nov 2007 18:10:57 GMT
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: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message