Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
Lee Peik Feng
I am using clink 170 and having problem with Chunked Transfer Coding.
According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1
The chunk-size field is a string of hex digits
But in HTTPPacket.set(InputStream in, boolean onlyHeaders)
The following line seems to have problem geting the chunk-size.
contentLen = Long.parseLong(new String(chunkSizeLine.getBytes(), 0, chunkSizeLine.length()-2));
I have modified the line as follow:
contentLen = Long.parseLong(chunkSizeLine, 16);
and it works properly now.
Thanks for your bug report.
I will fix the bug as following.
contentLen = Long.parseLong(new String(chunkSizeLine.getBytes(), 0, chunkSizeLine.length()-2), 16);
I will check and fix other bugs for the chunked stream, and
release as the next minor version with your patch :-)
I also met this problem and found solution same as found Lee Peik Feng.
Why do you cut 'chunkSizeLine' ?
Java documentation say:
a String containing the contents of the line, not including any line-termination characters, or null if the end of the stream has been reached