You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ go version
go version go1.0.3
I'm writing a web application which uses cookies, using the standard library http
support, running on port 8008.
The problem is that 'net/http'.Request.Host returns a host like 'my.app.local:8008'.
The host and port parts of the http request should be separately available for use with
cookies
eg: http://play.golang.org/p/cL9UevZuY5
The text was updated successfully, but these errors were encountered:
Can't you just use net.SplitHostPort, or easier: not set the domain on the cookie? It
doesn't seem worth it to add more fields to the Request.
It's already documented to be of the form "host:port":
http://tip.golang.org/pkg/net/http/#Request
// The host on which the URL is sought.
// Per RFC 2616, this is either the value of the Host: header
// or the host name given in the URL itself.
// It may be of the form "host:port".
Host string
Closing this bug for now, but feel free to comment if I've missed something.
by daniel.r.heath:
The text was updated successfully, but these errors were encountered: