Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/net/http/cookiejar/jar.go
Original file line number Diff line number Diff line change
Expand Up @@ -449,13 +449,13 @@ func (j *Jar) domainAndType(host, domain string) (string, bool, error) {
// host cookie.
return host, true, nil
}

if isIP(host) {
//Allow domain cookie to be set on ip address to replicate browser behaviour !!!
/*if isIP(host) {
// According to RFC 6265 domain-matching includes not being
// an IP address.
// TODO: This might be relaxed as in common browsers.
return "", false, errNoHostname
}
}*/

// From here on: If the cookie is valid, it is a domain cookie (with
// the one exception of a public suffix below).
Expand Down