Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] IllegalArgumentException

Actually, to be a little bit more precise.

Jetty has already received 25797 bytes of content for the response, but has not yet entered into the committed mode (where the response headers and response body content is starting to be written to the client) for the response.
This slice of time you hit is where the servlet/filter/etc has shoved content to Jetty, and Jetty has not yet had the ability to write the content to the client.
It would be impossible at this point to have a content length shorter than what you have already provided.
Perhaps the filter that Gunnar pointed out didn't do a response.reset() before it attempted to change the response?


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


On Wed, Aug 13, 2014 at 5:09 AM, Gunnar Wagenknecht <gunnar@xxxxxxxxxxxxxxx> wrote:
On 2014-08-12 16:14:03 +0000, Petar Tahchiev said:
java.lang.IllegalArgumentException: setContentLength(894) when already written 25797
        at org.eclipse.jetty.server.Response.setContentLength(Response.java:1003)
        at org.springframework.web.filter.ShallowEtagHeaderFilter.updateResponse(ShallowEtagHeaderFilter.java:117)

The second line of your stacktrace is from the Spring framework. The name looks like a filter. I'd guess that the filter calculated a different conent length then Jetty. Perhaps more content was written than the filter expected?

-Gunnar

--
Gunnar Wagenknecht
gunnar@xxxxxxxxxxxxxxx


_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


Back to the top