Commit 4dda23a1 authored by Volker Dobler's avatar Volker Dobler Committed by Andrew Gerrand

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
parent 7419921b
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment