Fix ServerCookieDecoder javadoc (#11372)

Motivation:
When decoding the cookies on the server, the "Cookie" HTTP request header value should be considered.
The "Set-Cookie" HTTP response header is used to send cookies from the server to the user agent.

Modification:
- Specify in javadoc that the "Cookie" HTTP request header value should be considered and
not the "Set-Cookie" HTTP response header value.

Result:
Correct ServerCookieDecoder javadoc
This commit is contained in:
Violeta Georgieva 2021-06-08 02:33:31 +03:00 committed by NiteshKant
parent b0d1bff64b
commit 1a28c26b4b

View File

@ -60,8 +60,8 @@ public final class ServerCookieDecoder extends CookieDecoder {
} }
/** /**
* Decodes the specified Set-Cookie HTTP header value into a {@link Cookie}. Unlike {@link #decode(String)}, this * Decodes the specified {@code Cookie} HTTP header value into a {@link Cookie}. Unlike {@link #decode(String)},
* includes all cookie values present, even if they have the same name. * this includes all cookie values present, even if they have the same name.
* *
* @return the decoded {@link Cookie} * @return the decoded {@link Cookie}
*/ */
@ -72,7 +72,7 @@ public final class ServerCookieDecoder extends CookieDecoder {
} }
/** /**
* Decodes the specified Set-Cookie HTTP header value into a {@link Cookie}. * Decodes the specified {@code Cookie} HTTP header value into a {@link Cookie}.
* *
* @return the decoded {@link Cookie} * @return the decoded {@link Cookie}
*/ */
@ -83,9 +83,7 @@ public final class ServerCookieDecoder extends CookieDecoder {
} }
/** /**
* Decodes the specified Set-Cookie HTTP header value into a {@link Cookie}. * Decodes the specified {@code Cookie} HTTP header value into a {@link Cookie}.
*
* @return the decoded {@link Cookie}
*/ */
private void decode(Collection<? super Cookie> cookies, String header) { private void decode(Collection<? super Cookie> cookies, String header) {
final int headerLen = requireNonNull(header, "header").length(); final int headerLen = requireNonNull(header, "header").length();