Skip to content

Add compliance mode for LEGACY multipart parser in Jetty 10+ - #8008

Merged
lachlan-roberts merged 3 commits into
jetty-10.0.xfrom
jetty-10.0.x-legacyMultipartParser
May 26, 2022
Merged

lachlan-roberts merged 3 commits into
jetty-10.0.xfrom
jetty-10.0.x-legacyMultipartParser

Conversation

@lachlan-roberts

@lachlan-roberts lachlan-roberts commented May 17, 2022 •

Copy link
Copy Markdown
Member

Introduce multipart RFC7578/LEGACY compliance modes to Jetty 10 with a default of RFC7578.
This allows an option to revert to the less efficient decoding of the LEGACY decoder which allows deprecated line terminations and decodes parts with the deprecated Content-Transfer-Encoding.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
@lachlan-roberts
lachlan-roberts requested review from gregw and joakime May 17, 2022 01:08
@lachlan-roberts lachlan-roberts added the Sponsored This issue affects a user with a commercial support agreement label May 23, 2022

@gregw gregw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we need this legacy mode going forward, then I don't think it is viable to continue with 2 different parsers. We will need to work out how to make the one parser handle the different line terminations

gregw
gregw previously approved these changes May 24, 2022

@gregw gregw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am provisionally approving this just to solve the short term problem......

BUT this should not be merged forward to jetty-12 (well do the merge, but then revert the code). In 12, we need to go to fully asynchronous multipart parsing and it will be unsustainable to have 2 parsers to be so maintained.

So keep the issue open and let's solve it properly in 12.

Comment thread jetty-util/src/main/java/org/eclipse/jetty/util/ReadLineInputStream.java Outdated
@lachlan-roberts
lachlan-roberts merged commit 99c743c into jetty-10.0.x May 26, 2022
@lachlan-roberts
lachlan-roberts deleted the jetty-10.0.x-legacyMultipartParser branch May 26, 2022 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Sponsored This issue affects a user with a commercial support agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants