diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/Cookies.java b/jetty-server/src/main/java/org/eclipse/jetty/server/Cookies.java index 7e1b26a1577..f141e76f847 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/Cookies.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/Cookies.java @@ -122,16 +122,23 @@ public class Cookies extends CookieCutter @Override protected void addCookie(String name, String value, String domain, String path, int version, String comment) { - Cookie cookie = new Cookie(name,value); - if (domain!=null) - cookie.setDomain(domain); - if (path!=null) - cookie.setPath(path); - if (version>0) - cookie.setVersion(version); - if (comment!=null) - cookie.setComment(comment); - _cookieList.add(cookie); + try + { + Cookie cookie = new Cookie(name,value); + if (domain!=null) + cookie.setDomain(domain); + if (path!=null) + cookie.setPath(path); + if (version>0) + cookie.setVersion(version); + if (comment!=null) + cookie.setComment(comment); + _cookieList.add(cookie); + } + catch(Exception e) + { + LOG.debug(e); + } } }