public enum HttpCompliance extends Enum<HttpCompliance>
HttpComplianceSections which are applied
when the mode is enabled.
Currently the set of modes is an enum and cannot be dynamically extended, but future major releases may convert this
to a class. To modify modes there are four custom modes that can be modified by setting the property
org.eclipse.jetty.http.HttpCompliance.CUSTOMn (where 'n' is '0', '1', '2' or '3'), to a comma separated
list of sections. The list should start with one of the following strings:
HttpComplianceSectionsHttpComplianceSectionsHttpComplianceSections application to https://tools.ietf.org/html/rfc2616,
but not https://tools.ietf.org/html/rfc7230HttpComplianceSections application to https://tools.ietf.org/html/rfc7230HttpComplianceSections to include them in the mode, or prefixed
with a '-' to exclude thm from the mode. Note that Jetty's modes may have some historic minor differences from the strict
RFC compliance, for example the RFC2616_LEGACY HttpCompliance is defined as
RFC2616,-FIELD_COLON,-METHOD_CASE_SENSITIVE.
Note also that the EnumSet return by sections() is mutable, so that modes may
be altered in code and will affect all usages of the mode.
| Enum Constant and Description |
|---|
CUSTOM0
Deprecated.
|
CUSTOM1
Deprecated.
|
CUSTOM2
Deprecated.
|
CUSTOM3
Deprecated.
|
LEGACY
A Legacy compliance mode to match jetty's behavior prior to RFC2616 and RFC7230.
|
RFC2616
The strict RFC2616 support mode
|
RFC2616_LEGACY
The legacy RFC2616 support, which incorrectly excludes
HttpComplianceSection.METHOD_CASE_SENSITIVE,
HttpComplianceSection.FIELD_COLON,
HttpComplianceSection.TRANSFER_ENCODING_WITH_CONTENT_LENGTH,
HttpComplianceSection.MULTIPLE_CONTENT_LENGTHS, |
RFC7230
The RFC7230 support mode
|
RFC7230_LEGACY
Jetty's current RFC7230 support, which incorrectly excludes
HttpComplianceSection.METHOD_CASE_SENSITIVE |
| Modifier and Type | Field and Description |
|---|---|
static String |
VIOLATIONS_ATTR |
| Modifier and Type | Method and Description |
|---|---|
static HttpCompliance |
requiredCompliance(HttpComplianceSection section) |
EnumSet<HttpComplianceSection> |
sections()
Get the set of
HttpComplianceSections supported by this compliance mode. |
static HttpCompliance |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HttpCompliance[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HttpCompliance LEGACY
public static final HttpCompliance RFC2616_LEGACY
HttpComplianceSection.METHOD_CASE_SENSITIVE,
HttpComplianceSection.FIELD_COLON,
HttpComplianceSection.TRANSFER_ENCODING_WITH_CONTENT_LENGTH,
HttpComplianceSection.MULTIPLE_CONTENT_LENGTHS,public static final HttpCompliance RFC2616
public static final HttpCompliance RFC7230_LEGACY
HttpComplianceSection.METHOD_CASE_SENSITIVEpublic static final HttpCompliance RFC7230
@Deprecated public static final HttpCompliance CUSTOM0
org.eclipse.jetty.http.HttpCompliance.CUSTOM0@Deprecated public static final HttpCompliance CUSTOM1
org.eclipse.jetty.http.HttpCompliance.CUSTOM1@Deprecated public static final HttpCompliance CUSTOM2
org.eclipse.jetty.http.HttpCompliance.CUSTOM2@Deprecated public static final HttpCompliance CUSTOM3
org.eclipse.jetty.http.HttpCompliance.CUSTOM3public static final String VIOLATIONS_ATTR
public static HttpCompliance[] values()
for (HttpCompliance c : HttpCompliance.values()) System.out.println(c);
public static HttpCompliance valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static HttpCompliance requiredCompliance(HttpComplianceSection section)
section - The section to querypublic EnumSet<HttpComplianceSection> sections()
HttpComplianceSections supported by this compliance mode. This set
is mutable, so it can be modified. Any modification will affect all usages of the mode
within the same ClassLoader.HttpComplianceSections supported by this compliance mode.Copyright © 2010 - 2020 Adobe. All Rights Reserved