Tomcat.addServlet(ctx, "invalid", new CookieServlet("na;me", "value"));
ctx.addServletMapping("/invalid", "invalid");
+ Tomcat.addServlet(ctx, "null", new CookieServlet(null, "value"));
+ ctx.addServletMapping("/null", "null");
+ Tomcat.addServlet(ctx, "blank", new CookieServlet("", "value"));
+ ctx.addServletMapping("/blank", "blank");
Tomcat.addServlet(ctx, "invalidFwd",
new CookieServlet("na/me", "value"));
ctx.addServletMapping("/invalidFwd", "invalidFwd");
ByteChunk res = getUrl("http://localhost:" + getPort() + "/invalid");
assertEquals("Cookie name fail", res.toString());
+ res = getUrl("http://localhost:" + getPort() + "/null");
+ assertEquals("Cookie name fail", res.toString());
+ res = getUrl("http://localhost:" + getPort() + "/blank");
+ assertEquals("Cookie name fail", res.toString());
res = getUrl("http://localhost:" + getPort() + "/invalidFwd");
assertEquals("Cookie name ok", res.toString());
res = getUrl("http://localhost:" + getPort() + "/invalidStrict");
ByteChunk res = getUrl("http://localhost:" + getPort() + "/invalid");
assertEquals("Cookie name fail", res.toString());
+ res = getUrl("http://localhost:" + getPort() + "/null");
+ assertEquals("Cookie name fail", res.toString());
+ res = getUrl("http://localhost:" + getPort() + "/blank");
+ assertEquals("Cookie name fail", res.toString());
res = getUrl("http://localhost:" + getPort() + "/invalidFwd");
assertEquals("Cookie name ok", res.toString());
res = getUrl("http://localhost:" + getPort() + "/invalidStrict");
ByteChunk res = getUrl("http://localhost:" + getPort() + "/invalid");
assertEquals("Cookie name fail", res.toString());
+ res = getUrl("http://localhost:" + getPort() + "/null");
+ assertEquals("Cookie name fail", res.toString());
+ res = getUrl("http://localhost:" + getPort() + "/blank");
+ assertEquals("Cookie name fail", res.toString());
res = getUrl("http://localhost:" + getPort() + "/invalidFwd");
assertEquals("Cookie name ok", res.toString());
res = getUrl("http://localhost:" + getPort() + "/invalidStrict");
ByteChunk res = getUrl("http://localhost:" + getPort() + "/invalid");
assertEquals("Cookie name fail", res.toString());
+ res = getUrl("http://localhost:" + getPort() + "/null");
+ assertEquals("Cookie name fail", res.toString());
+ res = getUrl("http://localhost:" + getPort() + "/blank");
+ assertEquals("Cookie name fail", res.toString());
res = getUrl("http://localhost:" + getPort() + "/invalidFwd");
assertEquals("Cookie name fail", res.toString());
res = getUrl("http://localhost:" + getPort() + "/invalidStrict");
ByteChunk res = getUrl("http://localhost:" + getPort() + "/invalid");
assertEquals("Cookie name fail", res.toString());
+ res = getUrl("http://localhost:" + getPort() + "/null");
+ assertEquals("Cookie name fail", res.toString());
+ res = getUrl("http://localhost:" + getPort() + "/blank");
+ assertEquals("Cookie name fail", res.toString());
res = getUrl("http://localhost:" + getPort() + "/invalidFwd");
assertEquals("Cookie name fail", res.toString());
res = getUrl("http://localhost:" + getPort() + "/invalidStrict");