-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8008 from eclipse/jetty-10.0.x-legacyMultipartParser
Add compliance mode for LEGACY multipart parser in Jetty 10+
- Loading branch information
Showing
11 changed files
with
1,436 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
jetty-server/src/main/java/org/eclipse/jetty/server/MultiPartFormDataCompliance.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// | ||
// ======================================================================== | ||
// Copyright (c) 1995-2022 Mort Bay Consulting Pty Ltd and others. | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License v. 2.0 which is available at | ||
// https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
// which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
// ======================================================================== | ||
// | ||
|
||
package org.eclipse.jetty.server; | ||
|
||
/** | ||
* The compliance level for parsing <code>multiPart/form-data</code> | ||
*/ | ||
public enum MultiPartFormDataCompliance | ||
{ | ||
/** | ||
* Legacy <code>multiPart/form-data</code> parsing which is slow but forgiving. | ||
* It will accept non-compliant preambles and inconsistent line termination. | ||
* | ||
* @see org.eclipse.jetty.server.MultiPartInputStreamParser | ||
*/ | ||
LEGACY, | ||
/** | ||
* RFC7578 compliant parsing that is a fast but strict parser. | ||
* | ||
* @see org.eclipse.jetty.server.MultiPartFormInputStream | ||
*/ | ||
RFC7578 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.