I am working with an external API/web that has a cookie with an @
on its name. Go-lang does not support this and ignores the Set-Cookie
.
How can I implement this without modifying the Go source code directly?
As implemented on Go:
http://tools.ietf.org/html/rfc6265#section-4.1.1 specifies that:
set-cookie-header = "Set-Cookie:" SP set-cookie-string
set-cookie-string = cookie-pair *( ";" SP cookie-av )
cookie-pair = cookie-name "=" cookie-value
cookie-name = token
Then in http://tools.ietf.org/html/rfc2616#section-2.2, token is
specified as:
token = 1*<any CHAR except CTLs or separators>
separators = "(" | ")" | "<" | ">" | "@"
| "," | ";" | ":" | "\" | <">
| "/" | "[" | "]" | "?" | "="
| "{" | "}" | SP | HT