From 199088a7c5e88105fb9016d713921ac74e9cbdea Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Fri, 13 Mar 2009 12:55:38 +0000 Subject: [PATCH] Two FIXMEs --- .../java/org/jboss/netty/handler/codec/http/CookieDecoder.java | 2 ++ .../java/org/jboss/netty/handler/codec/http/CookieEncoder.java | 2 ++ 2 files changed, 4 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 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) {