Cookie header parser based on RFC6265
The parsing of cookies using RFC6265 is more relaxed that the specification in the following ways:
Implementation note:
This class has been carefully tuned. Before committing any changes, ensure that the TesterCookiePerformance unit test
continues to give results within 1% for the old and new parsers.
| Modifier and Type | Class and Description |
|---|---|
| private static class | Cookie.
Custom implementation that skips many of the safety checks in |
| Modifier and Type | Field and Description |
|---|---|
| private static final byte | |
| private static final byte | |
| private static final byte[] | |
| private static final byte | |
| private static final UserDataHelper | |
| private static final boolean[] | |
| private static final boolean[] | |
| private static final Log | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final StringManager | |
| private static final byte | |
| private static final byte |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| public static void | |
| private static Cookie. | readCookieValueRfc6265(Cookie.
Similar to readCookieValue() but treats a comma as part of an invalid value. |
| private static Cookie. | |
| private static SkipResult | |
| private static void | |
| private static void |
| COMMA_BYTE | back to summary |
|---|---|
| private static final byte COMMA_BYTE | |
| DEL_BYTE | back to summary |
|---|---|
| private static final byte DEL_BYTE | |
| EMPTY_BYTES | back to summary |
|---|---|
| private static final byte[] EMPTY_BYTES | |
| EQUALS_BYTE | back to summary |
|---|---|
| private static final byte EQUALS_BYTE | |
| invalidCookieLog | back to summary |
|---|---|
| private static final UserDataHelper invalidCookieLog | |
| isCookieOctet | back to summary |
|---|---|
| private static final boolean[] isCookieOctet | |
| isText | back to summary |
|---|---|
| private static final boolean[] isText | |
| log | back to summary |
|---|---|
| private static final Log log | |
| QUOTE_BYTE | back to summary |
|---|---|
| private static final byte QUOTE_BYTE | |
| SEMICOLON_BYTE | back to summary |
|---|---|
| private static final byte SEMICOLON_BYTE | |
| SLASH_BYTE | back to summary |
|---|---|
| private static final byte SLASH_BYTE | |
| sm | back to summary |
|---|---|
| private static final StringManager sm | |
| SPACE_BYTE | back to summary |
|---|---|
| private static final byte SPACE_BYTE | |
| TAB_BYTE | back to summary |
|---|---|
| private static final byte TAB_BYTE | |
| Cookie | back to summary |
|---|---|
| private Cookie() | |
| logInvalidHeader | back to summary |
|---|---|
| private static void logInvalidHeader(int start, Cookie. | |
| parseCookie | back to summary |
|---|---|
| public static void parseCookie(byte[] bytes, int offset, int len, ServerCookies serverCookies) | |
| readCookieValueRfc6265 | back to summary |
|---|---|
| private static Cookie. Similar to readCookieValue() but treats a comma as part of an invalid value. | |
| readToken | back to summary |
|---|---|
| private static Cookie. | |
| skipByte | back to summary |
|---|---|
| private static SkipResult skipByte(Cookie. | |
| skipLWS | back to summary |
|---|---|
| private static void skipLWS(Cookie. | |
| skipUntilSemiColon | back to summary |
|---|---|
| private static void skipUntilSemiColon(Cookie. | |
java.nio.ByteBuffer .
| Modifier and Type | Field and Description |
|---|---|
| private final byte[] | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public byte[] | |
| public byte | |
| public boolean | |
| public int | |
| public int | |
| public void | |
| public int | |
| public void | |
| public String |
| bytes | back to summary |
|---|---|
| private final byte[] bytes | |
| limit | back to summary |
|---|---|
| private int limit | |
| position | back to summary |
|---|---|
| private int position | |
| ByteBuffer | back to summary |
|---|---|
| pack-priv ByteBuffer(byte[] bytes, int offset, int len) | |
| array | back to summary |
|---|---|
| public byte[] array() | |
| get | back to summary |
|---|---|
| public byte get() | |
| hasRemaining | back to summary |
|---|---|
| public boolean hasRemaining() | |
| limit | back to summary |
|---|---|
| public int limit() | |
| position | back to summary |
|---|---|
| public int position() | |
| position | back to summary |
|---|---|
| public void position(int position) | |
| remaining | back to summary |
|---|---|
| public int remaining() | |
| rewind | back to summary |
|---|---|
| public void rewind() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |