From fae46dabf19c13fc784776dd4f1f95cee5d2c87b Mon Sep 17 00:00:00 2001 From: Jeff Pinner Date: Mon, 7 Nov 2011 12:03:34 -0800 Subject: [PATCH] ignore HttpOnly as a cookie name instead of throwing exception --- .../org/jboss/netty/handler/codec/http/CookieDecoder.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/jboss/netty/handler/codec/http/CookieDecoder.java b/src/main/java/org/jboss/netty/handler/codec/http/CookieDecoder.java index 98b5b09fe1..e1e5e01bbd 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/CookieDecoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/CookieDecoder.java @@ -95,6 +95,11 @@ public class CookieDecoder { Set cookies = new TreeSet(); for (; i < names.size(); i ++) { String name = names.get(i); + // Not all user agents understand the HttpOnly attribute -- be lenient + if (CookieHeaderNames.HTTPONLY.equalsIgnoreCase(name)) { + continue; + } + String value = values.get(i); if (value == null) { value = "";