Fixed issue: NETTY-229 CookieDecoder throws IllegalArgumentException if the day of week string in 'expires' attribute is not abbreviated.

This commit is contained in:
Trustin Lee 2009-09-21 01:20:00 +00:00
parent 3179d8094e
commit e67e99a847

View File

@ -81,8 +81,7 @@ public class CookieDecoder {
// An exceptional case:
// 'Expires' attribute can contain a comma without surrounded with quotes.
if (name.equalsIgnoreCase(CookieHeaderNames.EXPIRES) &&
value.length() <= 3) {
// value contains comma, but not surrounded with quotes.
value.length() <= 9) { // Longest day of week is 'Wednesday'.
if (m.find(pos)) {
value = value + ", " + m.group(1);
pos = m.end();