Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] HttpParser - badMessage: java.lang.IllegalStateException: too much data after closed for HttpReceiverOverHTTP

Am 18.07.2014 13:28, schrieb Petropoulos Vasilis:

> I got this error when the bytes of headers terminate
> with more than one CR-LF.

since header and body is separated by an empty line, more
than one CRLF between to headers will be seen as that.
So if that happens after the Content-Length-header, parts
of the header will be seen as part of the body and after
reaching the declared numbers of bytes there will still
be bytes left available to be read that will most likely
lead to the error-message in the subject.

So: Yes, it's a bad idea to use CRLFCRLF in the header
since this violates the HTTP-standard.

Cheers, Lothar

Back to the top