[JBoss JIRA] Created: (NETTY-229) CookieDecoder throws IllegalArgumentException if the day of week string in 'expires' attribute is not abbreviated.

Trustin Lee (JIRA) jira-events at lists.jboss.org
Sun Sep 20 21:19:49 EDT 2009


CookieDecoder throws IllegalArgumentException if the day of week string in 'expires' attribute is not abbreviated.
------------------------------------------------------------------------------------------------------------------

                 Key: NETTY-229
                 URL: https://jira.jboss.org/jira/browse/NETTY-229
             Project: Netty
          Issue Type: Bug
          Components: Handler
            Reporter: Trustin Lee
            Assignee: Trustin Lee
             Fix For: 3.1.4.GA


The following cookie header triggers an IllegalArgumentException during decoding:

Set-Cookie: ABT=%3A%3A%232dd086ca2a46e9e50fff44e0ec48cb811st0%3A1254074762%3AB; expires=Sunday, 27-Sep-09 11:06:02 PDT; path=/; domain=.facebook.com; httponly

It is because the day of week ('Sunday') was not abbreviated, hence not recognized by CookieDecoder properly.

Here's the detailed information:

Stack trace:
java.lang.IllegalArgumentException: name contains one of the following prohibited characters: =,; \t\r\n\v\f: 27-Sep-09 11:06:02 PDT
org.jboss.netty.handler.codec.http.DefaultCookie.<init>(DefaultCookie.java:88)
org.jboss.netty.handler.codec.http.CookieDecoder.decode(CookieDecoder.java:115)

Header content:

HTTP/1.1 200 OK
Cache-Control: private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Content-Length: 9
Content-Type: text/html; charset=utf-8
Date: Sun, 20 Sep 2009 18:06:02 GMT
Expires: Mon, 26 Jul 1997 05:00:00 GMT
P3P: CP="DSP LAW"
Pragma: no-cache
Set-Cookie: ABT=%3A%3A%232dd086ca2a46e9e50fff44e0ec48cb811st0%3A1254074762%3AB; expires=Sunday, 27-Sep-09 11:06:02 PDT; path=/; domain=.facebook.com; httponly
Set-Cookie: datr=1253469962-cec8a980dfeead3a5b7714933d72135a852e86e1e96bdbc7fd8fe; expires=Tuesday, 20-Sep-11 11:06:02 PDT; path=/; domain=.facebook.com
Set-Cookie: lsd=xLGjw; path=/; domain=.facebook.com
Set-Cookie: reg_fb_gate=http%3A%2F%2Fwww.facebook.com%2Fhttp%3A%2Fwww.facebook.com%2Flogin.php; path=/; domain=.facebook.com
Set-Cookie: reg_fb_ref=http%3A%2F%2Fwww.facebook.com%2Fhttp%3A%2Fwww.facebook.com%2Flogin.php; path=/; domain=.facebook.com
Set-Cookie: test_cookie=1; path=/; domain=.facebook.com


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the netty-dev mailing list