Violations which are applied
when the mode is enabled.
| Modifier and Type | Class and Description |
|---|---|
| public static enum |
| Modifier and Type | Field and Description |
|---|---|
| private static final AtomicInteger | |
| private final String | |
| private final Set | |
| private static final List | |
| public static final HttpCompliance | LEGACY
A legacy HttpCompliance mode that allows all violations except case-insensitive methods. |
| private static final Logger | |
| public static final HttpCompliance | |
| public static final HttpCompliance | RFC2616_LEGACY
A legacy HttpCompliance mode that supports |
| public static final HttpCompliance | |
| public static final HttpCompliance | RFC7230_LEGACY
A legacy HttpCompliance mode that supports |
| public static final String | VIOLATIONS_ATTR
The request attribute which may be set to record any allowed HTTP violations. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | allows(ComplianceViolation
The violation)ComplianceViolation to testImplements org. |
| private static void | assertAllowed(HttpCompliance.
|
| public static void | checkHttpCompliance(MetaData.
|
| private static Set | |
| private static Set | |
| public static HttpCompliance | |
| public Set | |
| public Set | |
| public String | |
| public String | |
| public static HttpCompliance | Returns: The mode matching the name.The name of a known name)HttpCompliance mode.Get a known compliance mode by name. |
| public HttpCompliance | Returns: A newHttpCompliance mode.The name of the new mode name, HttpCompliance.The violations to include violationsCreate a new HttpCompliance mode that includes the passed |
| public HttpCompliance | Returns: A newHttpCompliance mode.The name of the new mode name, HttpCompliance.The violations to exclude violationsCreate a new HttpCompliance mode that excludes the passed |
| __custom | back to summary |
|---|---|
| private static final AtomicInteger __custom | |
| _name | back to summary |
|---|---|
| private final String _name | |
| _violations | back to summary |
|---|---|
| private final Set<HttpCompliance. | |
| KNOWN_MODES | back to summary |
|---|---|
| private static final List<HttpCompliance> KNOWN_MODES | |
| LEGACY | back to summary |
|---|---|
| public static final HttpCompliance LEGACY A legacy HttpCompliance mode that allows all violations except case-insensitive methods. | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| RFC2616 | back to summary |
|---|---|
| public static final HttpCompliance RFC2616 The HttpCompliance mode that supports RFC 7230
with only the violations that differ from | |
| RFC2616_LEGACY | back to summary |
|---|---|
| public static final HttpCompliance RFC2616_LEGACY A legacy HttpCompliance mode that supports | |
| RFC7230 | back to summary |
|---|---|
| public static final HttpCompliance RFC7230 The HttpCompliance mode that supports RFC 7230 with no known violations. | |
| RFC7230_LEGACY | back to summary |
|---|---|
| public static final HttpCompliance RFC7230_LEGACY A legacy HttpCompliance mode that supports | |
| VIOLATIONS_ATTR | back to summary |
|---|---|
| public static final String VIOLATIONS_ATTR
Deprecated for removal since 12.0.6. use The request attribute which may be set to record any allowed HTTP violations.
| |
| HttpCompliance | back to summary |
|---|---|
| private HttpCompliance(String name, Set<HttpCompliance. | |
| allows | back to summary |
|---|---|
| public boolean allows(ComplianceViolation violation) Implements org.
| |
| assertAllowed | back to summary |
|---|---|
| private static void assertAllowed(HttpCompliance. | |
| checkHttpCompliance | back to summary |
|---|---|
| public static void checkHttpCompliance(MetaData. | |
| copyOf | back to summary |
|---|---|
| private static Set | |
| copyOf | back to summary |
|---|---|
| private static Set | |
| from | back to summary |
|---|---|
| public static HttpCompliance from(String spec) Create compliance mode from a String description. Format:
The remainder of the list can contain then names of
| |
| getAllowed | back to summary |
|---|---|
| public Set Implements org.
| |
| getKnown | back to summary |
|---|---|
| public Set Implements org.
| |
| getName | back to summary |
|---|---|
| public String getName() Implements org.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| valueOf | back to summary |
|---|---|
| public static HttpCompliance valueOf(String name) Get a known compliance mode by name.
| |
| with | back to summary |
|---|---|
| public HttpCompliance with(String name, HttpCompliance. Create a new HttpCompliance mode that includes the passed
| |
| without | back to summary |
|---|---|
| public HttpCompliance without(String name, HttpCompliance. Create a new HttpCompliance mode that excludes the passed
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final HttpCompliance. | CASE_INSENSITIVE_METHOD
The HTTP RFC(s) require that method names are case-sensitive, so that " |
| public static final HttpCompliance. | CASE_SENSITIVE_FIELD_NAME
The HTTP RFC(s) require that field names are case-insensitive, so for example the fields " |
| private final String | |
| public static final HttpCompliance. | DUPLICATE_HOST_HEADERS
Since RFC 7230: Section 5.4, the HTTP protocol says that a Server must reject a request duplicate host headers. |
| public static final HttpCompliance. | HTTP_0_9
Since RFC 7230, the expectation that HTTP/0.9 is supported has been removed from the specification. |
| public static final HttpCompliance. | MISMATCHED_AUTHORITY
Since RFC 7230: Section 5.4, the HTTP protocol must reject a request if the target URI has an authority that is different than a provided Host header. |
| public static final HttpCompliance. | MULTILINE_FIELD_VALUE
Since RFC 7230, the HTTP protocol no longer supports line folding, which allows a field value to be provided over several lines. |
| public static final HttpCompliance. | MULTIPLE_CONTENT_LENGTHS
Since RFC 7230, the HTTP protocol has required that
a request is invalid if it contains multiple |
| public static final HttpCompliance. | NO_COLON_AFTER_FIELD_NAME
Prior to RFC 7230, the HTTP protocol allowed a header line of a single token with neither a colon nor value following, to be interpreted as a field name with no value. |
| public static final HttpCompliance. | TRANSFER_ENCODING_WITH_CONTENT_LENGTH
Since RFC 7230, the HTTP protocol has required that
a request is invalid if it contains both a |
| public static final HttpCompliance. | UNSAFE_HOST_HEADER
Since RFC 7230, the HTTP protocol should reject a request if the Host headers contains an invalid / unsafe authority. |
| private final String | |
| public static final HttpCompliance. | WHITESPACE_AFTER_FIELD_NAME
Since RFC 7230, the HTTP protocol has required that a request header field has no white space after the field name and before the ':'. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public String | |
| public String | |
| public static HttpCompliance. | |
| public static HttpCompliance. |
| CASE_INSENSITIVE_METHOD | back to summary |
|---|---|
| public static final HttpCompliance. The HTTP RFC(s) require that method names are case-sensitive, so that " | |
| CASE_SENSITIVE_FIELD_NAME | back to summary |
|---|---|
| public static final HttpCompliance. The HTTP RFC(s) require that field names are case-insensitive, so for example the fields " | |
| description | back to summary |
|---|---|
| private final String description | |
| DUPLICATE_HOST_HEADERS | back to summary |
|---|---|
| public static final HttpCompliance. Since RFC 7230: Section 5.4, the HTTP protocol says that a Server must reject a request duplicate host headers. A deployment may include this violation to allow duplicate host headers on a received request. | |
| HTTP_0_9 | back to summary |
|---|---|
| public static final HttpCompliance. Since RFC 7230, the expectation that HTTP/0.9 is supported has been removed from the specification. If a deployment
wished to accept HTTP/0.9 requests, then it can include this violation in it's | |
| MISMATCHED_AUTHORITY | back to summary |
|---|---|
| public static final HttpCompliance. Since RFC 7230: Section 5.4, the HTTP protocol must reject a request if the target URI has an authority that is different than a provided Host header. A deployment may include this violation to allow different values on the target URI and the Host header on a received request. | |
| MULTILINE_FIELD_VALUE | back to summary |
|---|---|
| public static final HttpCompliance. Since RFC 7230, the HTTP protocol no longer supports
line folding, which allows a field value to be provided over several lines. Deployments that wish to receive folder
field values may include this violation in their | |
| MULTIPLE_CONTENT_LENGTHS | back to summary |
|---|---|
| public static final HttpCompliance. Since RFC 7230, the HTTP protocol has required that
a request is invalid if it contains multiple | |
| NO_COLON_AFTER_FIELD_NAME | back to summary |
|---|---|
| public static final HttpCompliance. Prior to RFC 7230, the HTTP protocol allowed a header line of a single token with neither a colon nor value following, to be interpreted as a field name with no value. A deployment may include this violation to allow such fields to be in a received request. | |
| TRANSFER_ENCODING_WITH_CONTENT_LENGTH | back to summary |
|---|---|
| public static final HttpCompliance. Since RFC 7230, the HTTP protocol has required that
a request is invalid if it contains both a | |
| UNSAFE_HOST_HEADER | back to summary |
|---|---|
| public static final HttpCompliance. Since RFC 7230, the HTTP protocol should reject a request if the Host headers contains an invalid / unsafe authority. A deployment may include this violation to allow unsafe host headesr on a received request. | |
| url | back to summary |
|---|---|
| private final String url | |
| WHITESPACE_AFTER_FIELD_NAME | back to summary |
|---|---|
| public static final HttpCompliance. Since RFC 7230, the HTTP protocol has required that a request header field has no white space after the field name and before the ':'. A deployment may include this violation to allow such fields to be in a received request. | |
| Violation | back to summary |
|---|---|
| private Violation(String url, String description) | |
| getDescription | back to summary |
|---|---|
| public String getDescription() Implements org.
| |
| getName | back to summary |
|---|---|
| public String getName() Implements org.
| |
| getURL | back to summary |
|---|---|
| public String getURL() Implements org.
| |
| valueOf | back to summary |
|---|---|
| public static HttpCompliance. | |
| values | back to summary |
|---|---|
| public static HttpCompliance. | |