Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Jetty problem with content-length in 9.0.0.M5

This bug was reported and fixed recently.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=400631

It will be fixed in the next release, likely 9.0.0.RC1

--
Joakim Erdfelt <joakim@xxxxxxxxxxx>
Developer advice, services and support
from the Jetty & CometD experts


On Thu, Feb 14, 2013 at 5:20 PM, Brad McEvoy <brad@xxxxxxxxxxxxxxxxxxxx> wrote:
I've been using maven jetty plugin version 9.0.0.M5

The milton.io webdav servlet generates a PROPFIND response XML and converts to a byte array. The length of this byte array is set as the content length header, and then the byte array is written to the outputstream, followed by a flush of the response outputstream

This causes an EOF exception

This servlet is in widespread use and I've been using with Jetty 6 without problem.

If i remove the call to out.flush() then the exception doesnt occur, and the client receives the response, but subsequent requests hang until the TCP socket times out - indicating a mismatch between the content length header set and actual content sent.

I then down-graded to jetty plugin 8.1.8.v20121106 and the servlet then works as expected - no EOF exceptions.

So it seems that jetty9 is adding an extra byte to the content sent, or something similar. Note the problem only occurs when setting an explicit content length. If i remove the content length header jetty uses chunked encoding correctly. However, not all webdav clients support chunked encoding.

Thanks,
Brad
_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-dev


Back to the top