hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AlliumPorrum <purjonloo...@luukku.com>
Subject Re: java.io.IOException: Bad chunk size??
Date Thu, 08 Nov 2007 13:47:37 GMT

Ok, found the problem. And, unfortunately, it was in my own client code...

I have a few TimerTask's that request some data every now and then from a
website. All TimerTask's run in own threads, but due one mistake in my code,
they all shared the same instance of HTTPClient. Crash-boom-bang! I changed
the code so that now every thread has own HTTPClient and everything works
just fine.

Sorry & thanks ;=)

AlliumPorrum wrote:
> Hi!
> I'm all the time getting following exception from
> org.apache.commons.httpclient.ChunkedInputStream when I try to read a line
> from the stream:
> 18:26:21.241 > CourseParser: ***** java.io.IOException: Bad chunk size:
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> java.io.IOException: Bad chunk size: <!DOCTYPE HTML PUBLIC "-//W3C//DTD
> HTML 4.01 Transitional//EN">
> at
> org.apache.commons.httpclient.ChunkedInputStream.getChunkSizeFromInputStream(ChunkedInputStream.java:305)
> at
> org.apache.commons.httpclient.ChunkedInputStream.nextChunk(ChunkedInputStream.java:220)
> at
> org.apache.commons.httpclient.ChunkedInputStream.read(ChunkedInputStream.java:175)
> at java.io.FilterInputStream.read(FilterInputStream.java:116)
> at
> org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:107)
> at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
> at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
> at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
> at java.io.InputStreamReader.read(InputStreamReader.java:167)
> at java.io.BufferedReader.fill(BufferedReader.java:136)
> at java.io.BufferedReader.readLine(BufferedReader.java:299)
> at java.io.BufferedReader.readLine(BufferedReader.java:362)
> I have read HTTP client documentations and searched hours from internet,
> but I just can't find the solution. Could someone please tell me what
> should I do to fix this issue??

View this message in context: http://www.nabble.com/java.io.IOException%3A-Bad-chunk-size---tf4759686.html#a13647228
Sent from the HttpClient-User mailing list archive at Nabble.com.

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

View raw message