Enum HttpCompliance

  • All Implemented Interfaces:
    Serializable, Comparable<HttpCompliance>

    public enum HttpCompliance
    extends Enum<HttpCompliance>
    HTTP compliance modes for Jetty HTTP parsing and handling. A Compliance mode consists of a set of 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:

    0
    No HttpComplianceSections
    *
    All HttpComplianceSections
    RFC2616
    The set of HttpComplianceSections application to https://tools.ietf.org/html/rfc2616, but not https://tools.ietf.org/html/rfc7230
    RFC7230
    The set of HttpComplianceSections application to https://tools.ietf.org/html/rfc7230
    The remainder of the list can contain then names of HttpComplianceSections 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.