Stream closed



Hello Adobe Community,
We have a problem with Jetty: Stream closed at org.eclipse.jetty.server.ResponseWriter.isOpen( at org.eclipse.jetty.server.ResponseWriter.flush( at ... Caused by: Stream closed at org.eclipse.jetty.server.ResponseWriter.isOpen( at org.eclipse.jetty.server.ResponseWriter.write( at at$LoggerResponseWriter.write( at$1.write(
I need to inject a large script (~64k) in a static html file, and I am using a Servlet Filter for this purpose, but once I create the result, on the response write this exception is thrown. I tried to look at the Jetty configuration in OSGi but playing with the response buffer didn't help. Actually, I was able to make it work in local environment just randomly, after a series of deployments. The source is ok 100%, without any doubt, the problem seems the truncation at 64k of the response by Jetty. Is there anybody in this community that faced such or a similar issue? Any help or hint would be very welcome.
Thx in advance

Answers (1)

Answers (1)




Hi Artur,


May I ask you to try and:

"increase Jetty servlet engine's response buffer size to avoid early auto-flushing. Response Buffer Size can be set on the Jetty OSGi configuration (http://host:port/system/console/configMgr/org.apache.felix.http). You could safely increase this as high as 200000." [1]




Additionally, I would ask you to look at your code and verify that no where else in other parts of your code you don't close the stream before this filter.