HttpHeaders implementations.
| Modifier and Type | Class and Description |
|---|---|
| public abstract static class | HeaderUtils.
An |
| public abstract static class | HeaderUtils.
An |
| Modifier and Type | Field and Description |
|---|---|
| public static final BiFunction | |
| pack-priv static final int | HASH_CODE_SEED
Constant used to seed the hash code generation. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static boolean | containsCommaSeparatedValueIgnoreCase(final HttpHeaders headers, final CharSequence name, final CharSequence value)
|
| private static boolean | Returns: true if the value is found, false otherwise.the comma separated values. commaSeparatedValues, final CharSequence the value to look for. needle)Returns |
| public static boolean | Returns: true if there is a match.The domain from the request. requestDomain, final @Nullable CharSequence The domain from the cookie. cookieDomain) |
| public static boolean | isSetCookieNameMatches(final CharSequence
The set-cookie-string. setCookieString, final CharSequence The cookie-name. setCookieName)Determine if a set-cookie-string's
cookie-name matches |
| public static boolean | Returns: true if headers indicates transfer-encoding chunked, false
otherwise.The headers)HttpHeaders to check.Returns |
| private static int | |
| private static int | |
| public static @Nullable HttpCookiePair | Returns:
The cookie-string that may
contain multiple cookie-pairs. cookieString, final CharSequence The cookie-name identifying
the cookie-pairs to parse. cookiePairName)Parse a single cookie-pair from a cookie-string. |
| public static @Nullable HttpSetCookie | parseSetCookie(final CharSequence
The set-cookie-string. setCookieString, final CharSequence The cookie-name. setCookieName, final boolean true to attempt extra validation.Parse a |
| public static boolean | Returns: true if there is a match.The path from the request. requestPath, final @Nullable CharSequence The path from the cookie. cookiePath) |
| public static @Nullable CharSequence | Returns:
The cookie-string that may
contain multiple cookie-pairs. cookieString, final CharSequence The cookie-name identifying
the cookie-pairs to remove. cookiePairName)Remove a single cookie-pair for a cookie-string. |
| pack-priv static String | toString(final HttpHeaders headers, final BiFunction<? super CharSequence, ? super CharSequence, CharSequence> filter)
|
| pack-priv static void | |
| pack-priv static void | |
| pack-priv static void | validateToken(final CharSequence
the token to validate. token)Validate a token contains only allowed characters. |
| DEFAULT_HEADER_FILTER | back to summary |
|---|---|
| public static final BiFunction<? super CharSequence, ? super CharSequence, CharSequence> DEFAULT_HEADER_FILTER | |
| HASH_CODE_SEED | back to summary |
|---|---|
| pack-priv static final int HASH_CODE_SEED Constant used to seed the hash code generation. Could be anything but this was borrowed from murmur3. | |
| HeaderUtils | back to summary |
|---|---|
| private HeaderUtils() | |
| containsCommaSeparatedValueIgnoreCase | back to summary |
|---|---|
| pack-priv static boolean containsCommaSeparatedValueIgnoreCase(final HttpHeaders headers, final CharSequence name, final CharSequence value) | |
| containsCommaSeparatedValueIgnoreCase | back to summary |
|---|---|
| private static boolean containsCommaSeparatedValueIgnoreCase(final CharSequence commaSeparatedValues, final CharSequence needle) Returns
| |
| domainMatches | back to summary |
|---|---|
public static boolean domainMatches(final CharSequence requestDomain, final @Nullable CharSequence cookieDomain)
| |
| isSetCookieNameMatches | back to summary |
|---|---|
| public static boolean isSetCookieNameMatches(final CharSequence setCookieString, final CharSequence setCookieName) Determine if a set-cookie-string's
cookie-name matches
| |
| isTransferEncodingChunked | back to summary |
|---|---|
| public static boolean isTransferEncodingChunked(final HttpHeaders headers) Returns
The values of all
| |
| nextCookieDelimiter | back to summary |
|---|---|
| private static int nextCookieDelimiter(CharSequence cookieHeaderValue, int startIndex) | |
| nextCookieDelimiter | back to summary |
|---|---|
| private static int nextCookieDelimiter(AsciiString cookieHeaderValue, int startIndex) | |
| parseCookiePair | back to summary |
|---|---|
| public static @Nullable HttpCookiePair parseCookiePair(final CharSequence cookieString, final CharSequence cookiePairName) Parse a single cookie-pair from a cookie-string.
| |
| parseSetCookie | back to summary |
|---|---|
| public static @Nullable HttpSetCookie parseSetCookie(final CharSequence setCookieString, final CharSequence setCookieName, final boolean validate) Parse a
| |
| pathMatches | back to summary |
|---|---|
public static boolean pathMatches(final CharSequence requestPath, final @Nullable CharSequence cookiePath)
| |
| removeCookiePairs | back to summary |
|---|---|
| public static @Nullable CharSequence removeCookiePairs(final CharSequence cookieString, final CharSequence cookiePairName) Remove a single cookie-pair for a cookie-string.
| |
| toString | back to summary |
|---|---|
| pack-priv static String toString(final HttpHeaders headers, final BiFunction<? super CharSequence, ? super CharSequence, CharSequence> filter) | |
| validateCookieNameAndValue | back to summary |
|---|---|
| pack-priv static void validateCookieNameAndValue(final CharSequence cookieName, final CharSequence cookieValue) | |
| validateHeaderValue | back to summary |
|---|---|
| pack-priv static void validateHeaderValue(final CharSequence value) | |
| validateToken | back to summary |
|---|---|
| pack-priv static void validateToken(final CharSequence token) Validate a token contains only allowed characters. The token format is used for variety of HTTP components, like cookie-name, field-name of a header-field, or request method.
| |
Iterator of HttpCookiePair designed to iterate across multiple values of
HttpHeaderNames#COOKIE for a specific cookie-name.
| Modifier and Type | Field and Description |
|---|---|
| private final CharSequence | |
| private @Nullable HttpCookiePair | |
| private int |
| Access | Constructor and Description |
|---|---|
| protected | AbstractCookiesByNameIterator(final CharSequence
Each return value of cookiePairName)next() will have HttpCookiePair#name() equivalent
to this value.Create a new instance. |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract void | advanceCookieHeaderValue()
Advance the |
| protected abstract @Nullable CharSequence | |
| private @Nullable HttpCookiePair | findNext(CharSequence
The current value for cookieHeaderValue)HttpHeaderNames#COOKIE.Find the next |
| public final boolean | |
| protected final void | initNext(CharSequence
The initial value for cookieHeaderValue)HttpHeaderNames#COOKIE.Initialize the next |
| public final HttpCookiePair |
| cookiePairName | back to summary |
|---|---|
| private final CharSequence cookiePairName | |
| next | back to summary |
|---|---|
| private @Nullable HttpCookiePair next
| |
| nextNextStart | back to summary |
|---|---|
| private int nextNextStart | |
| AbstractCookiesByNameIterator | back to summary |
|---|---|
| protected AbstractCookiesByNameIterator(final CharSequence cookiePairName) Create a new instance.
| |
| advanceCookieHeaderValue | back to summary |
|---|---|
| protected abstract void advanceCookieHeaderValue() Advance the | |
| cookieHeaderValue | back to summary |
|---|---|
| protected abstract @Nullable CharSequence cookieHeaderValue() Get the current value for
| |
| findNext | back to summary |
|---|---|
| private @Nullable HttpCookiePair findNext(CharSequence cookieHeaderValue) Find the next
| |
| hasNext | back to summary |
|---|---|
| public final boolean hasNext() Implements java. Doc from java. Returns
| |
| initNext | back to summary |
|---|---|
| protected final void initNext(CharSequence cookieHeaderValue) Initialize the next
| |
| next | back to summary |
|---|---|
| public final HttpCookiePair next() Implements java. Doc from java. Returns the next element in the iteration.
| |
| Modifier and Type | Field and Description |
|---|---|
| private @Nullable HttpCookiePair | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract void | advanceCookieHeaderValue()
Advance the |
| protected abstract @Nullable CharSequence | |
| private HttpCookiePair | findNext(CharSequence
The current value for cookieHeaderValue)HttpHeaderNames#COOKIE.Find the next |
| public final boolean | |
| protected final void | initNext(CharSequence
The initial value for cookieHeaderValue)HttpHeaderNames#COOKIE.Initialize the next |
| public final HttpCookiePair |
| next | back to summary |
|---|---|
| private @Nullable HttpCookiePair next
| |
| nextNextStart | back to summary |
|---|---|
| private int nextNextStart | |
| AbstractCookiesIterator | back to summary |
|---|---|
| public AbstractCookiesIterator() | |
| advanceCookieHeaderValue | back to summary |
|---|---|
| protected abstract void advanceCookieHeaderValue() Advance the | |
| cookieHeaderValue | back to summary |
|---|---|
| protected abstract @Nullable CharSequence cookieHeaderValue() Get the current value for
| |
| findNext | back to summary |
|---|---|
| private HttpCookiePair findNext(CharSequence cookieHeaderValue) Find the next
| |
| hasNext | back to summary |
|---|---|
| public final boolean hasNext() Implements java. Doc from java. Returns
| |
| initNext | back to summary |
|---|---|
| protected final void initNext(CharSequence cookieHeaderValue) Initialize the next
| |
| next | back to summary |
|---|---|
| public final HttpCookiePair next() Implements java. Doc from java. Returns the next element in the iteration.
| |