New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CAMEL-20152: camel-jetty - Allow to configure the multipart #12240
Conversation
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🤖 CI automation will test this PR automatically. 🐫 Apache Camel Committers, please review the following items:
|
...ts/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
Show resolved
Hide resolved
...ts/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
Outdated
Show resolved
Hide resolved
f59fa05
to
139fec8
Compare
Due to jetty/jetty.project#10936 |
Is Camel using Jetty 12 with the ee10 environment? These changes seem to be for Jetty 11, which is for Servlet 5.0. This API spec behavior, where fileSizeThreshold value of 0 is documented, first shows up on Servlet 6.0. Jetty 12 on the ee10 environment already supports this spec behavior. |
Yes its Jetty 11 in the source, however we are also working on upgrading to Jetty 12 for the upcoming Camel 4.3 release. But older Camel releases are using Jetty 11 and 9. |
Note, Jetty 9 is now at End of Community Support. |
Please note that even if it is mentioned only in EE 10, it is actually a clarification see jakartaee/servlet#111, for example, in Glassfish and Tomcat, it is how it has been implemented even in very old versions that is why I proposed it in version 11 but I can understand your point of view. |
And IMHO, it makes more sense to consider that a threshold set to 0 is immediately reached instead of never being reached like it was set to Integer.MAX_VALUE which is somehow the current behavior in any version of Jetty |
Fixes https://issues.apache.org/jira/browse/CAMEL-20152
Motivation
In the case of multipart, the content is kept in memory which can lead to an OOME, it is due to the fact that the
fileSizeThreshold
is set to0
by default which should mean that the content is stored on disk according to the Jakarta Javadoc but it is not what the Jetty code expects.Modifications: