From: Volker Dobler Date: Sun, 15 Jan 2012 08:32:16 +0000 (+1100) Subject: http: Allow cookies with negative Max-Age attribute as these are X-Git-Tag: weekly.2012-01-15~5 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=4dda23a1d0f793f53661dd973e29c793e67aa9aa;p=gostls13.git 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 --- diff --git a/src/pkg/net/http/cookie.go b/src/pkg/net/http/cookie.go index cad852242e..2e30bbff17 100644 --- a/src/pkg/net/http/cookie.go +++ b/src/pkg/net/http/cookie.go @@ -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 {