Skip to content

Commit 8eff40d

Browse files
1 parent ed1f812 commit 8eff40d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/net/http/cookiejar/jar.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,13 +449,13 @@ func (j *Jar) domainAndType(host, domain string) (string, bool, error) {
449449
// host cookie.
450450
return host, true, nil
451451
}
452-
453-
if isIP(host) {
452+
//Allow domain cookie to be set on ip address to replicate browser behaviour !!!
453+
/*if isIP(host) {
454454
// According to RFC 6265 domain-matching includes not being
455455
// an IP address.
456456
// TODO: This might be relaxed as in common browsers.
457457
return "", false, errNoHostname
458-
}
458+
}*/
459459

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

0 commit comments

Comments
 (0)