Can any one tell me why the Bogus chunk size error occurs.
Exception at the swingToSvlt method:java.io.IOException:Bogus chunk size//->java.io.IOException: Bogus chunk size at sun.net.www.http.ChunkedInputStream.processRaw(Unknown Source)>>at sun.net.www.http.ChunkedInputStream.readAheadBlocking(Unknown Source)>>at sun.net.www.http.ChunkedInputStream.readAhead(Unknown Source)>>at sun.net.www.http.ChunkedInputStream.read(Unknown Source)>>at java.io.FilterInputStream.read(Unknown Source)>>at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown Source)>>at java.io.ObjectInputStream$PeekInputStream.read(Unknown Source)>>at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)>>at java.io.ObjectInputStream$BlockDataInputStream.readUTFBody(Unknown Source)>>at java.io.ObjectInputStream$BlockDataInputStream.readUTF(Unknown Source)>>at java.io.ObjectInputStream.readString(Unknown Source)>>at java.io.ObjectInputStream.readObject0(Unknown Source)>>at java.io.ObjectInputStream.defaultReadFields(Unknown Source)>>at java.io.ObjectInputStream.readSerialData(Unknown Source)>>at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)>>at java.io.ObjectInputStream.readObject0(Unknown Source)>>at java.io.ObjectInputStream.readObject(Unknown Source)>>at java.util.ArrayList.readObject(Unknown Source)>>at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)>>at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)>>at java.lang.reflect.Method.invoke(Unknown Source)>>at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)>>at java.io.ObjectInputStream.readSerialData(Unknown Source)>>at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)>>at java.io.ObjectInputStream.readObject0(Unknown Source)>>at java.io.ObjectInputStream.readObject(Unknown Source)>>at java.util.Hashtable.readObject(Unknown Source)>>at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)>>at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)>>at java.lang.reflect.Method.invoke(Unknown Source)>>at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)>>at java.io.ObjectInputStream.readSerialData(Unknown Source)>>at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)>>at java.io.ObjectInputStream.readObject0(Unknown Source)>>at java.io.ObjectInputStream.readObject(Unknown Source)
From the code ChunkedInputStream#processRaw, line 306, we have:
/*
* Extract the chunk size from the header (ignoring extensions).
*/
String header = new String(rawData, rawPos, pos-rawPos+1, "US-ASCII");
for (i=0; i < header.length(); i++) {
if (Character.digit(header.charAt(i), 16) == -1)
break;
}
try {
chunkSize = Integer.parseInt(header.substring(0, i), 16);
} catch (NumberFormatException e) {
error = true;
throw new IOException("Bogus chunk size");
}
It looks like the server is sending incorrect headers, I'd see exactly what is being sent, and start to find the problem there.