• Volker Dobler's avatar
    net/http: allow commas and spaces in cookie values · ed88076c
    Volker Dobler authored
    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
    ed88076c
cookie.go 8.59 KB