update servlet push cookie handling to servlet 6.1 behaviour
This commit is contained in:
parent
98aa755dd8
commit
82ab704769
|
@ -782,7 +782,8 @@ public class ServletApiRequest implements HttpServletRequest
|
|||
if (httpCookie == null)
|
||||
continue;
|
||||
|
||||
if (httpCookie.isExpired())
|
||||
// this should be httpCookie.isExpired(), but because of an error in the servlet spec it is
|
||||
if (httpCookie.isExpired() || (httpCookie.getMaxAge() < 0))
|
||||
{
|
||||
for (Iterator<Object> i = cookies.iterator(); i.hasNext();)
|
||||
{
|
||||
|
|
|
@ -57,9 +57,10 @@ public class PushedResourcesTest extends AbstractTest
|
|||
protected void service(HttpServletRequest request, HttpServletResponse response) throws IOException
|
||||
{
|
||||
Cookie cookie0 = new Cookie("C0", "v0");
|
||||
cookie0.setMaxAge(0);
|
||||
cookie0.setMaxAge(-1);
|
||||
response.addCookie(cookie0);
|
||||
Cookie cookie1 = new Cookie("C1", "v1");
|
||||
cookie1.setMaxAge(1);
|
||||
response.addCookie(cookie1);
|
||||
|
||||
String target = request.getRequestURI();
|
||||
|
|
Loading…
Reference in New Issue