Class MultiPartCompliance
java.lang.Object
org.eclipse.jetty.http.MultiPartCompliance
- All Implemented Interfaces:
 ComplianceViolation.Mode
The compliance mode for MultiPart handling.
- 
Nested Class Summary
Nested Classes - 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MultiPartComplianceLegacymultiPart/form-dataparsing which is slow, buggy, but forgiving to a fault.static final MultiPartComplianceRFC7578multiPart/form-datacompliant parsing lenient to LF EOL and Content-Transfer-Encoding.static final MultiPartComplianceStrict (RFC7578)multiPart/form-datacompliant strict parsing. - 
Constructor Summary
ConstructorsConstructorDescriptionMultiPartCompliance(String name, Set<MultiPartCompliance.Violation> violations)  - 
Method Summary
Modifier and TypeMethodDescriptionbooleanallows(ComplianceViolation violation) static MultiPartComplianceCreate compliance set from string.static MultiPartCompliancefrom(Set<MultiPartCompliance.Violation> violations) Create compliance set from a set of allowed Violations.getKnown()getName()toString()static MultiPartCompliance 
- 
Field Details
- 
RFC7578_STRICT
Strict (RFC7578)multiPart/form-datacompliant strict parsing. - 
RFC7578
RFC7578multiPart/form-datacompliant parsing lenient to LF EOL and Content-Transfer-Encoding. - 
LEGACY
LegacymultiPart/form-dataparsing which is slow, buggy, but forgiving to a fault. This mode is not recommended for websites on the public internet. It will accept non-compliant preambles and inconsistent line termination that are in violation of RFC7578. 
 - 
 - 
Constructor Details
- 
MultiPartCompliance
 
 - 
 - 
Method Details
- 
valueOf
 - 
from
Create compliance set from a set of allowed Violations.- Parameters:
 violations- A string of violations to allow:- Returns:
 - the compliance from the string spec
 
 - 
from
Create compliance set from string.Format:
<BASE>[,[-]<violation>]...BASE is one of:
- 0
 - No 
MultiPartCompliance.Violations - *
 - All 
MultiPartCompliance.Violations - <name>
 - The name of a static instance of MultiPartCompliance (e.g. 
LEGACY). 
The remainder of the list can contain then names of
MultiPartCompliance.Violations to include them in the mode, or prefixed with a '-' to exclude them from the mode. Examples are:0,CONTENT_TRANSFER_ENCODING- Only allow 
MultiPartCompliance.Violation.CONTENT_TRANSFER_ENCODING *,-BASE64_TRANSFER_ENCODING- Only all except 
MultiPartCompliance.Violation.BASE64_TRANSFER_ENCODING LEGACY,BASE64_TRANSFER_ENCODING- Same as LEGACY plus 
MultiPartCompliance.Violation.BASE64_TRANSFER_ENCODING 
- Parameters:
 spec- A string describing the compliance- Returns:
 - the MultiPartCompliance instance derived from the string description
 
 - 
getName
- Specified by:
 getNamein interfaceComplianceViolation.Mode- Returns:
 - The name of the compliance violation mode.
 
 - 
allows
- Specified by:
 allowsin interfaceComplianceViolation.Mode- Parameters:
 violation- TheComplianceViolationto test- Returns:
 - true iff the violation is allowed by this mode.
 
 - 
getKnown
- Specified by:
 getKnownin interfaceComplianceViolation.Mode- Returns:
 - The immutable set of all known violations for this mode.
 
 - 
getAllowed
- Specified by:
 getAllowedin interfaceComplianceViolation.Mode- Returns:
 - The immutable set of violations allowed by this mode.
 
 - 
toString
 
 -