|
|
|
@ -23,7 +23,6 @@ import java.util.regex.Pattern; |
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.http.ResponseCookie; |
|
|
|
import org.springframework.http.ResponseCookie; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Parser that delegates to {@link java.net.HttpCookie#parse(String)} for parsing, |
|
|
|
* Parser that delegates to {@link java.net.HttpCookie#parse(String)} for parsing, |
|
|
|
* but also extracts and sets {@code sameSite}. |
|
|
|
* but also extracts and sets {@code sameSite}. |
|
|
|
@ -39,6 +38,7 @@ final class JdkResponseCookieParser implements ResponseCookie.Parser { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Parse the given headers. |
|
|
|
* Parse the given headers. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<ResponseCookie> parse(String header) { |
|
|
|
public List<ResponseCookie> parse(String header) { |
|
|
|
Matcher matcher = SAME_SITE_PATTERN.matcher(header); |
|
|
|
Matcher matcher = SAME_SITE_PATTERN.matcher(header); |
|
|
|
String sameSite = (matcher.matches() ? matcher.group(1) : null); |
|
|
|
String sameSite = (matcher.matches() ? matcher.group(1) : null); |
|
|
|
|