Skip to content
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

Add maxFormPart configuration option for Jetty. #495

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

ekharkunov
Copy link
Contributor

If tried to build project with lots of source file (native part) you can get 400 Bad request on /build_async request. It happened because Jetty has option maxFormPart that didn't respect in previous versions. With additional logging on Jetty side (options -Dlogging.level.org.eclipse.jetty=DEBUG -Dlogging.level.org.eclipse.jetty.websocket=DEBUG) following error become visible

2024-10-03 17:45:34 Caused by: org.eclipse.jetty.http.BadMessageException: 400: bad multipart
2024-10-03 17:45:34     ... 118 common frames omitted
2024-10-03 17:45:34 Caused by: java.lang.IllegalStateException: Form with too many keys [1001 > 1000]
2024-10-03 17:45:34     at org.eclipse.jetty.http.MultiPart$Parser.parse(MultiPart.java:1052)
2024-10-03 17:45:34     at org.eclipse.jetty.http.MultiPartFormData$Parser$1.parse(MultiPartFormData.java:311)
2024-10-03 17:45:34     at org.eclipse.jetty.http.MultiPartFormData$Parser$1.parse(MultiPartFormData.java:301)
2024-10-03 17:45:34     at org.eclipse.jetty.io.content.ContentSourceCompletableFuture.parse(ContentSourceCompletableFuture.java:104)
2024-10-03 17:45:34     at org.eclipse.jetty.http.MultiPartFormData$Parser.parse(MultiPartFormData.java:326)
2024-10-03 17:45:34     at org.eclipse.jetty.http.MultiPartFormData.from(MultiPartFormData.java:109)
2024-10-03 17:45:34     at org.eclipse.jetty.ee10.servlet.ServletMultiPartFormData.from(ServletMultiPartFormData.java:138)
2024-10-03 17:45:34     at org.eclipse.jetty.ee10.servlet.ServletMultiPartFormData.from(ServletMultiPartFormData.java:62)
2024-10-03 17:45:34     at org.eclipse.jetty.ee10.servlet.ServletApiRequest.getParts(ServletApiRequest.java:637)
2024-10-03 17:45:34     ... 117 common frames omitted

Copy link
Contributor

@Jhonnyg Jhonnyg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@ekharkunov ekharkunov merged commit 442f0e3 into dev Oct 4, 2024
@ekharkunov ekharkunov deleted the jetty-max-form-part branch October 4, 2024 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants