Issue #1405 - Cookie.name cannot be blank
This commit is contained in:
parent
ed9f7ddd4c
commit
f753b5468c
|
@ -173,6 +173,11 @@ public class Response implements HttpServletResponse
|
||||||
|
|
||||||
public void addCookie(HttpCookie cookie)
|
public void addCookie(HttpCookie cookie)
|
||||||
{
|
{
|
||||||
|
if (StringUtil.isBlank(cookie.getName()))
|
||||||
|
{
|
||||||
|
throw new IllegalArgumentException("Cookie.name cannot be blank/null");
|
||||||
|
}
|
||||||
|
|
||||||
if (getHttpChannel().getHttpConfiguration().isCookieCompliance(CookieCompliance.RFC2965))
|
if (getHttpChannel().getHttpConfiguration().isCookieCompliance(CookieCompliance.RFC2965))
|
||||||
addSetRFC2965Cookie(
|
addSetRFC2965Cookie(
|
||||||
cookie.getName(),
|
cookie.getName(),
|
||||||
|
@ -213,6 +218,11 @@ public class Response implements HttpServletResponse
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (StringUtil.isBlank(cookie.getName()))
|
||||||
|
{
|
||||||
|
throw new IllegalArgumentException("Cookie.name cannot be blank/null");
|
||||||
|
}
|
||||||
|
|
||||||
if (getHttpChannel().getHttpConfiguration().isCookieCompliance(CookieCompliance.RFC2965))
|
if (getHttpChannel().getHttpConfiguration().isCookieCompliance(CookieCompliance.RFC2965))
|
||||||
addSetRFC2965Cookie(cookie.getName(),
|
addSetRFC2965Cookie(cookie.getName(),
|
||||||
cookie.getValue(),
|
cookie.getValue(),
|
||||||
|
|
Loading…
Reference in New Issue