According to RFC 2109, cookie 2965 can be either an HTTP token or a quotation mark, and the token cannot contain non-ASCII characters.
However, I found that the Firefox browser (3.0.6) sends cookies using the utf-8 as-is line and the three web servers I tested (apache2, lighttpd, nginx) pass this line as an application.
For example, a raw request from a browser:
$ nc -l -p 8080 GET /hello HTTP/1.1 Host: localhost:8080 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.9) Gecko/2009050519 Firefox/2.0.0.13 (Debian-3.0.6-1) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: windows-1255,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cookie: wikipp=1234; wikipp_username=ארתיום Cache-Control: max-age=0
And the original response of the apache, nginx and lighttpd HTTP_COOKIE CGI HTTP_COOKIE :
wikipp=1234; wikipp_username=ארתיום
What am I missing?
source share