Closed epicavic closed 3 years ago
$ go version go version go1.15.8 darwin/amd64
1) http.SetCookie will silently drop the cookie header if name contains not allowed characters (parens in this case) https://golang.org/pkg/net/http/#SetCookie https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie
2) calling original handler before writing cookie would silently drop the cookie since header map has been already sent to user https://golang.org/pkg/net/http/#ResponseWriter https://golang.org/pkg/net/http/#ResponseWriter
$ go version go version go1.15.8 darwin/amd64
1) http.SetCookie will silently drop the cookie header if name contains not allowed characters (parens in this case) https://golang.org/pkg/net/http/#SetCookie https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie
2) calling original handler before writing cookie would silently drop the cookie since header map has been already sent to user https://golang.org/pkg/net/http/#ResponseWriter https://golang.org/pkg/net/http/#ResponseWriter