Closed
Description
-
isCookieNameValid do not allow "\r" "\n" appear in the cookie name.
https://github.com/golang/go/blob/master/src/net/http/cookie.go#L168
https://github.com/golang/go/blob/master/src/net/http/http.go#L50
https://github.com/golang/go/blob/master/src/internal/x/net/http/httpguts/httplex.go#L15 -
sanitizeCookieName replace "\r" "\n" to "-"
https://github.com/golang/go/blob/master/src/net/http/cookie.go#L172
This replace operation should have no effect.So it can be delete to save cpu time and make code easier to read.