mirror of
https://github.com/golang/go
synced 2024-11-21 23:34:42 -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:
parent
7419921bf3
commit
4dda23a1d0
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user