From: Volker Dobler Date: Mon, 6 Jan 2014 18:00:58 +0000 (-0800) Subject: net/http: remove todos from cookie code X-Git-Tag: go1.3beta1~1053 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=939b3fa39eafff3f10c092ef882c935c0bce9c06;p=gostls13.git net/http: remove todos from cookie code The Domain and Path field of a parsed cookie have been the unprocessed wire data since Go 1.0; this seems to be okay for most applications so let's keep it. Returning the unprocessed wire data makes it easy to handle nonstandard or even broken clients without consulting Raw or Unparsed of a cookie. The RFC 6265 parsing rules for domain and path are currently buried in net/http/cookiejar but could be exposed in net/http if necessary. R=bradfitz, nigeltao CC=golang-codereviews https://golang.org/cl/48060043 --- diff --git a/src/pkg/net/http/cookie.go b/src/pkg/net/http/cookie.go index 8b01c508eb..a1759214f3 100644 --- a/src/pkg/net/http/cookie.go +++ b/src/pkg/net/http/cookie.go @@ -94,7 +94,6 @@ func readSetCookies(h Header) []*Cookie { continue case "domain": c.Domain = val - // TODO: Add domain parsing continue case "max-age": secs, err := strconv.Atoi(val) @@ -121,7 +120,6 @@ func readSetCookies(h Header) []*Cookie { continue case "path": c.Path = val - // TODO: Add path parsing continue } c.Unparsed = append(c.Unparsed, parts[i])