1
0
mirror of https://github.com/golang/go synced 2024-11-12 09:50:21 -07:00

http: Allow cookies with negative Max-Age attribute as these are

allowed by RFC 6265 sec 5.2.2.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5533083
This commit is contained in:
Volker Dobler 2012-01-15 19:32:16 +11:00 committed by Andrew Gerrand
parent 7419921bf3
commit 4dda23a1d0

View File

@ -96,7 +96,7 @@ func readSetCookies(h Header) []*Cookie {
continue
case "max-age":
secs, err := strconv.Atoi(val)
if err != nil || secs < 0 || secs != 0 && val[0] == '0' {
if err != nil || secs != 0 && val[0] == '0' {
break
}
if secs <= 0 {