Hi Matteo, Thanks for the patch! I've just applied it to trunk.
HTH, Trustin On Dec 18, 2007 2:12 AM, Matteo Merli <[EMAIL PROTECTED]> wrote: > 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]> > -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6
