Two FIXMEs

This commit is contained in:
Trustin Lee 2009-03-13 12:55:38 +00:00
parent a26d1e4392
commit 199088a7c5
2 changed files with 4 additions and 0 deletions

View File

@ -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)) {

View File

@ -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) {