dotjay/hashgrid — pull request #10 by LoonyPandora (2012-04-24 15:06:32+00:00)
Title: Set valid cookies

Some user agents choke or spew warnings when you have a cookie with a comma in the value. They may work, but I believe it's better to follow the spec and not cause potential problems.

According to RFC 6265 the cookie value should only contain "US-ASCII characters excluding CTLs, whitespace DQUOTE, comma, semicolon, and backslash" [1]

RFC 6265 is the most recent RFC regarding cookies, but the restriction on the use of commas goes back to the original netscape cookie spec. [2]

I've simply changed the commas to dashes, any other character will do.

[1] http://tools.ietf.org/html/rfc6265#section-4.1.1
[2] http://curl.haxx.se/rfc/cookie%5Fspec.html