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)
|
||||
{
|
||||
if (StringUtil.isBlank(cookie.getName()))
|
||||
{
|
||||
throw new IllegalArgumentException("Cookie.name cannot be blank/null");
|
||||
}
|
||||
|
||||
if (getHttpChannel().getHttpConfiguration().isCookieCompliance(CookieCompliance.RFC2965))
|
||||
addSetRFC2965Cookie(
|
||||
cookie.getName(),
|
||||
|
@ -212,6 +217,11 @@ public class Response implements HttpServletResponse
|
|||
comment = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtil.isBlank(cookie.getName()))
|
||||
{
|
||||
throw new IllegalArgumentException("Cookie.name cannot be blank/null");
|
||||
}
|
||||
|
||||
if (getHttpChannel().getHttpConfiguration().isCookieCompliance(CookieCompliance.RFC2965))
|
||||
addSetRFC2965Cookie(cookie.getName(),
|
||||
|
|
Loading…
Reference in New Issue