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
-
Field Summary
Modifier and TypeFieldDescriptionstatic final CookieCompliance
A CookieCompliance mode that allows RFC 2965 compliance but does not allow:CookieCompliance.Violation.BAD_QUOTES
CookieCompliance.Violation.COMMA_NOT_VALID_OCTET
CookieCompliance.Violation.RESERVED_NAMES_NOT_DOLLAR_PREFIXED
static final CookieCompliance
A CookieCompliance mode that allows RFC 2965 compliance.static final CookieCompliance
A CookieCompliance mode that enforces RFC 6265 compliance, but allows:static final CookieCompliance
A CookieCompliance mode that enforces RFC 6265 compliance, but allows:static final CookieCompliance
A CookieCompliance mode that enforces RFC 6265 compliance. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
allows
(ComplianceViolation violation) boolean
compliesWith
(CookieCompliance mode) static CookieCompliance
Create 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.ATTRIBUTES
CookieCompliance.Violation.BAD_QUOTES
CookieCompliance.Violation.ESCAPE_IN_QUOTES
CookieCompliance.Violation.INVALID_COOKIES
CookieCompliance.Violation.OPTIONAL_WHITE_SPACE
CookieCompliance.Violation.SPECIAL_CHARS_IN_QUOTES
CookieCompliance.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.Violation
s - *
- All
CookieCompliance.Violation
s - <name>
- The name of a static instance of CookieCompliance (e.g.
RFC6265
).
The remainder of the list can contain then names of
CookieCompliance.Violation
s 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:
allows
in interfaceComplianceViolation.Mode
- Parameters:
violation
- TheComplianceViolation
to test- Returns:
- true iff the violation is allowed by this mode.
-
getName
- Specified by:
getName
in interfaceComplianceViolation.Mode
- Returns:
- The name of the compliance violation mode.
-
getKnown
- Specified by:
getKnown
in interfaceComplianceViolation.Mode
- Returns:
- The immutable set of all known violations for this mode.
-
getAllowed
- Specified by:
getAllowed
in interfaceComplianceViolation.Mode
- Returns:
- The immutable set of violations allowed by this mode.
-
compliesWith
-
toString
-