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 529a6c08ce..80d5f59c48 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 @@ -105,6 +105,8 @@ public class CookieDecoder { path = QueryStringDecoder.decodeComponent(value, charset); } else if (CookieHeaderNames.EXPIRES.equalsIgnoreCase(name)) { + // FIXME: Expires attribute has different representation from Max-Age. + // Format: Wdy, DD-Mon-YYYY HH:MM:SS GMT maxAge = Integer.valueOf(value); } else if (CookieHeaderNames.MAX_AGE.equalsIgnoreCase(name)) { diff --git a/src/main/java/org/jboss/netty/handler/codec/http/CookieEncoder.java b/src/main/java/org/jboss/netty/handler/codec/http/CookieEncoder.java index 9ddf5a6a36..45fefb02d8 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/CookieEncoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/CookieEncoder.java @@ -81,6 +81,8 @@ public class CookieEncoder { Cookie cookie = cookies.get(cookieName); add(sb, cookieName, QueryStringEncoder.encodeComponent(cookie.getValue(), charset)); + // FIXME: Expires attribute has different representation from Max-Age. + // Format: Wdy, DD-Mon-YYYY HH:MM:SS GMT add(sb, CookieHeaderNames.getMaxAgeString(encodingVersion), cookie.getMaxAge()); if (cookie.getPath() != null) {