Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'.

This commit is contained in:
Simone Bordet 2020-01-30 10:41:43 +01:00
commit 7592d36c4b
2 changed files with 3 additions and 5 deletions

View File

@ -47,7 +47,7 @@ public class HttpCookie
public static final String SAME_SITE_NONE_COMMENT = SAME_SITE_COMMENT + "NONE__";
public static final String SAME_SITE_LAX_COMMENT = SAME_SITE_COMMENT + "LAX__";
public static final String SAME_SITE_STRICT_COMMENT = SAME_SITE_COMMENT + "STRICT__";
/**
* Name of context attribute with default SameSite cookie value
*/
@ -81,7 +81,7 @@ public class HttpCookie
private final boolean _httpOnly;
private final long _expiration;
private final SameSite _sameSite;
public HttpCookie(String name, String value)
{
this(name, value, -1);
@ -289,7 +289,6 @@ public class HttpCookie
return getRFC6265SetCookie();
if (compliance == CookieCompliance.RFC2965)
return getRFC2965SetCookie();
throw new IllegalStateException();
}

View File

@ -51,7 +51,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
public class HttpCookieTest
{
@Test
public void testDefaultSameSite()
{
@ -77,7 +76,7 @@ public class HttpCookieTest
assertThrows(IllegalStateException.class,
() -> HttpCookie.getSameSiteDefault(context));
}
@Test
public void testConstructFromSetCookie()
{