Package org.eclipse.jetty.http
Class CookieCompliance
java.lang.Object
org.eclipse.jetty.http.CookieCompliance
- All Implemented Interfaces:
ComplianceViolation.Mode
The compliance mode for Cookie handling.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CookieComplianceA CookieCompliance mode that allows RFC 2965 compliance but does not allow:CookieCompliance.Violation.BAD_QUOTESCookieCompliance.Violation.COMMA_NOT_VALID_OCTETCookieCompliance.Violation.RESERVED_NAMES_NOT_DOLLAR_PREFIXEDstatic final CookieComplianceA CookieCompliance mode that allows RFC 2965 compliance.static final CookieComplianceA CookieCompliance mode that enforces RFC 6265 compliance, but allows:static final CookieComplianceA CookieCompliance mode that enforces RFC 6265 compliance, but allows:static final CookieComplianceA CookieCompliance mode that enforces RFC 6265 compliance. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanallows(ComplianceViolation violation) booleancompliesWith(CookieCompliance mode) static CookieComplianceCreate compliance set from string.getKnown()getName()toString()static CookieCompliance
-
Field Details
-
RFC6265
A CookieCompliance mode that enforces RFC 6265 compliance, but allows:
-
RFC6265_STRICT
A CookieCompliance mode that enforces RFC 6265 compliance. -
RFC6265_LEGACY
A CookieCompliance mode that enforces RFC 6265 compliance, but allows:
CookieCompliance.Violation.ATTRIBUTESCookieCompliance.Violation.BAD_QUOTESCookieCompliance.Violation.ESCAPE_IN_QUOTESCookieCompliance.Violation.INVALID_COOKIESCookieCompliance.Violation.OPTIONAL_WHITE_SPACECookieCompliance.Violation.SPECIAL_CHARS_IN_QUOTESCookieCompliance.Violation.SPACE_IN_VALUES
-
RFC2965_LEGACY
A CookieCompliance mode that allows RFC 2965 compliance. -
RFC2965
A CookieCompliance mode that allows RFC 2965 compliance but does not allow:
-
-
Constructor Details
-
CookieCompliance
-
-
Method Details
-
valueOf
-
from
Create compliance set from string.Format: <BASE>[,[-]<violation>]...
BASE is one of:
- 0
- No
CookieCompliance.Violations - *
- All
CookieCompliance.Violations - <name>
- The name of a static instance of CookieCompliance (e.g.
RFC6265).
The remainder of the list can contain then names of
CookieCompliance.Violations to include them in the mode, or prefixed with a '-' to exclude them from the mode. Examples are:0,RESERVED_NAMES_NOT_DOLLAR_PREFIXED- Only allow
CookieCompliance.Violation.RESERVED_NAMES_NOT_DOLLAR_PREFIXED *,-RESERVED_NAMES_NOT_DOLLAR_PREFIXED- Allow all violations, except
CookieCompliance.Violation.RESERVED_NAMES_NOT_DOLLAR_PREFIXED RFC2965,RESERVED_NAMES_NOT_DOLLAR_PREFIXED- Same as RFC2965, but allows
CookieCompliance.Violation.RESERVED_NAMES_NOT_DOLLAR_PREFIXED
- Parameters:
spec- A string describing the compliance- Returns:
- the compliance from the string spec
-
allows
- Specified by:
allowsin interfaceComplianceViolation.Mode- Parameters:
violation- TheComplianceViolationto test- Returns:
- true iff the violation is allowed by this mode.
-
getName
- Specified by:
getNamein interfaceComplianceViolation.Mode- Returns:
- The name of the compliance violation 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.
-
compliesWith
-
toString
-