Skip to content

Commit 939b3fa

Browse files
vdoblerbradfitz
authored andcommitted
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
1 parent eb93f86 commit 939b3fa

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/pkg/net/http/cookie.go

-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ func readSetCookies(h Header) []*Cookie {
9494
continue
9595
case "domain":
9696
c.Domain = val
97-
// TODO: Add domain parsing
9897
continue
9998
case "max-age":
10099
secs, err := strconv.Atoi(val)
@@ -121,7 +120,6 @@ func readSetCookies(h Header) []*Cookie {
121120
continue
122121
case "path":
123122
c.Path = val
124-
// TODO: Add path parsing
125123
continue
126124
}
127125
c.Unparsed = append(c.Unparsed, parts[i])

0 commit comments

Comments
 (0)