mirror of
https://github.com/golang/go
synced 2024-11-22 05:04:40 -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
|
continue
|
||||||
case "max-age":
|
case "max-age":
|
||||||
secs, err := strconv.Atoi(val)
|
secs, err := strconv.Atoi(val)
|
||||||
if err != nil || secs < 0 || secs != 0 && val[0] == '0' {
|
if err != nil || secs != 0 && val[0] == '0' {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
if secs <= 0 {
|
if secs <= 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user