-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Uploading big multipart files via jetty 12.0.5 with spring boot 3.2.1 cause problems #11310
Comments
This is surprising, as we upload 1GB, 4GB, and 10GB files during unit testing with content validation (file hash) on both sides. |
its also occurring with smaller files (200 MB) sometimes (= not each time reproducible). Should we create an issue on Spring Boot side as well, if it can also be related to the spring internal adaption code to integrate jetty? |
@lachlan-roberts any insight to this problem? |
do you have any updates on this issue? |
Spring is not using the Jetty multipart parser. Currently for Jetty 12 they are using EE10 servlets to adapt to the spring request/response which will then end up in their own We are currently working on an effort to update the adaption for Jetty 12 in spring (see spring-projects/spring-framework#32097). So I will try to test your reproducer tested against the work there. |
on spring side it was decided to change implementation only with next spring minor version 6.2, which will be released end of the year. This is unfortunately a little longer than expected @lachlan-roberts do you think that those problems should only occur with uploading such big files or is there a risk, that this can occur also with smaller files and during download? Because we currently try to decide whether Jetty 12 with Spring Boot 3.2 is prod ready or whether we have to rollback all services or only the one who handles such big files. Thank in advance for your feedback on this |
Be aware that spring produces improved error messages from their That could also point to your client not producing to spec Check your logs and exceptions to see if this is the case (read the above issue at spring-framework for details). |
We have no exceptions or error logs in such a case. Our client is using python 3 requests lib and it was working fine with spring boot 3.1, spring framework 6.0 and Jetty 11 and files are binary only (tar.gz). The problem occurred for first time after the switching to Spring Boot 3.2, Spring 6.1 and Jetty 12 |
I managed to reproduce the issue. And looks I was wrong and spring is using the Jetty multipart parser in this case.
|
@lachlan-roberts heads up, there is work going on in the MultiPart parsers in PR #8059 right now. I'm chasing a failing test in the core MultiPart.Parser in that PR. |
Signed-off-by: Lachlan Roberts <[email protected]>
@joakime I reproduced it in a Jetty test in https://github.com/jetty/jetty.project/tree/jetty-12.0.x-largeMultipartFailure 1c698e2 Another observation from this test is that the difference between the sent-content and the received-content always seems to start from a position in the array where the value is 13 (CR). So maybe it is the same issue you are investigating. |
@lachlan-roberts: @joakime found the issue, and it was fixed it in 9321e5e. |
@lachlan-roberts @sbordet I took the fix out of PR #11388 and made a new PR #11409 to fix this Issue here. Please give it a review. |
…rts (#11409) Fixed case in MultiPart.Parser where a small chunk contains part of the boundary. Added and fixed related tests. Signed-off-by: Simone Bordet <[email protected]> Co-authored-by: Simone Bordet <[email protected]>
we can confirm that current snapshot version (12.0.7-20240222.000749-22) fixed the problem on our side |
Jetty version(s),
12.0.5
Jetty Environment
ee10
Java version/vendor
(use: java -version)
java version "17.0.2" 2022-01-18 LTS
OS type/version
Windows
Description
We have a spring boot project which is using jetty server. After upgrading spring boot 3.2+ big file uploads with multipart file has broken something. Current endpoint is working like this:
How to reproduce?
The text was updated successfully, but these errors were encountered: