Hello,
one of my producers runs a custom script that is allowed to get access
to the HttpServletRequest and to invoke sendRedirect method on it. It
used to work on Camel 2 but with Camel 3.20.4 Jetty tells this:
16:19:38.178 [qtp987805552-43] ERROR
o.a.camel.component.jetty.CamelContinuationServlet - Error processing
request
org.eclipse.jetty.io.EofException: Closed
at
org.eclipse.jetty.server.HttpOutput.checkWritable(HttpOutput.java:771)
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:795)
at org.apache.camel.util.IOHelper.copy(IOHelper.java:206)
at org.apache.camel.util.IOHelper.copy(IOHelper.java:161)
at
org.apache.camel.http.common.DefaultHttpBinding.copyStream(DefaultHttpBinding.java:500)
at
org.apache.camel.http.common.DefaultHttpBinding.doWriteDirectResponse(DefaultHttpBinding.java:566)
at
org.apache.camel.http.common.DefaultHttpBinding.doWriteResponse(DefaultHttpBinding.java:439)
at
org.apache.camel.http.common.DefaultHttpBinding.writeResponse(DefaultHttpBinding.java:362)
A quick look at the DefaultHttpBinding.writeResponse shows it doesn't
check for HttpServletRequest.isCommitted(), only for the body to be blanc.
Is there any solution to allow users to send redirects in their scripts
in the processors? Couldn't find a dedicated Camel HttpMessage method
for that.
--fedd