Hi, I've found a problem in the HTTP codec because some server incorrectly send the chunk length.
These servers send the length follwed by some spaces, before the CRLF terminator. Example: http://del.icio.us/ The following patch fixed the problem for me: Index: filter-codec-http/src/main/java/org/apache/mina/filter/codec/http/ChunkedBodyDecodingState.java =================================================================== --- filter-codec-http/src/main/java/org/apache/mina/filter/codec/http/ChunkedBodyDecodingState.java (revision 604818) +++ filter-codec-http/src/main/java/org/apache/mina/filter/codec/http/ChunkedBodyDecodingState.java (working copy) @@ -107,8 +107,8 @@ protected boolean isTerminator(byte b) { if (!(b >= '0' && b <= '9' || b >= 'a' && b <= 'f' || b >= 'A' && b <= 'F')) { - if (b == '\r' || b == ';') { - chunkHasExtension = b == ';'; + if (b == ' ' || b == '\r' || b == ';') { + chunkHasExtension = (b == ';' || b == ' '); return true; } throw new IllegalArgumentException(); Best regards, Matteo -- Matteo Merli <[EMAIL PROTECTED]>
