]> Cypherpunks repositories - gostls13.git/commit
net/http: allow commas and spaces in cookie values
authorVolker Dobler <dr.volker.dobler@gmail.com>
Thu, 17 Apr 2014 06:01:02 +0000 (23:01 -0700)
committerNigel Tao <nigeltao@golang.org>
Thu, 17 Apr 2014 06:01:02 +0000 (23:01 -0700)
commited88076c6437fa87c26a568b46020eacc9202e13
treea53f09d7e30b238b00ee0423243e2bd35dccab94
parentf8f34c330c651b16ef8c54e60f4862b4a66b4a41
net/http: allow commas and spaces in cookie values

According to RFC 6265 a cookie value may contain neither
commas nor spaces but such values are very common in the
wild and browsers handle them very well so we'll allow
both commas and spaces.
Values starting or ending in a comma or a space are
sent in the quoted form to prevent missinterpetations.

RFC 6265 conforming values are handled as before and
semicolons, backslashes and double-quotes are still
disallowed.

Fixes #7243

LGTM=nigeltao
R=nigeltao
CC=bradfitz, golang-codereviews
https://golang.org/cl/86050045
src/pkg/net/http/cookie.go
src/pkg/net/http/cookie_test.go