CookieDecoder issues with Google Analytics
Dave Siracusa
dave.siracusa at yellowbook.com
Tue Nov 17 08:06:49 EST 2009
I'm getting the following exception:
java.lang.IllegalArgumentException: name contains one of the following
prohibited characters: =,; \t\r\n\v\f: /clearance,/32/dept.html
at
org.jboss.netty.handler.codec.http.DefaultCookie.<init>(DefaultCookie.java:89)
at
org.jboss.netty.handler.codec.http.CookieDecoder.decode(CookieDecoder.java:129)
Sample cookie:
__utma=48461872.1094088325.1258140131.1258140131.1258140131.1
__utmb=48461872.13.10.1258140131
__utmc=48461872
__utmz=48461872.1258140131.1.1.utmcsr=overstock.com|utmccn=(referral)|utmcmd=referral|utmcct=/Home-Garden/Furniture/Clearance,/clearance,/32/dept.html
Google Analytics uses commas in their cookie value, and who can argue with
Google.
I looked at the w3c rfc 2109 and it appears (I guess) that ;, are legitimate
delimiters.
An excerpt from the rfc:
The syntax for the header is:
cookie = "Cookie:" cookie-version
1*((";" | ",") cookie-value)
cookie-value = NAME "=" VALUE [";" path] [";" domain]
cookie-version = "$Version" "=" value
NAME = attr
VALUE = value
path = "$Path" "=" value
domain = "$Domain" "=" value
So do we ignore commas? Do we establish precedence with the first
encountered delimiter and ignore the other?
BTW - I didn't look at the cookeencoder.
--
View this message in context: http://n2.nabble.com/CookieDecoder-issues-with-Google-Analytics-tp4018428p4018428.html
Sent from the Netty Developer Group mailing list archive at Nabble.com.
More information about the netty-dev
mailing list