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
On all released versions, Get with a literal IPv6 address with a zone identifier fails. For example,
u := &url.URL{Scheme: "http", Host: "[::1%lo0]:8080"}
resp, err := http.DefaultClient.Get(u.String())
and
resp, err := http.Get("http://[::1%lo0]:8080")
return parse http://[::1%lo0]:8080: hexadecimal escape in host or parse [::1%lo0]:8080: invalid URL escape "%lo" error. After the fix of #6530, the former works well but the latter still fails.
The text was updated successfully, but these errors were encountered:
The RFC says that an HTTP client, proxy, or other intermediary MUST remove any ZoneID attached to an outgoing URI, as it has only local significance at the sending host.
…FC 6874
When making a request to an IPv6 address with a zone identifier, for
exmaple [fe80::1%en0], RFC 6874 says HTTP clients must remove the zone
identifier "%en0" before writing the request for security reason.
This change removes any IPv6 zone identifer attached to URI in the Host
header field in requests.
See golang/go#9544.
Change-Id: Ie5d18a0bc5f2768a95c59ec2b159ac0abdf685e8
Reviewed-on: https://go-review.googlesource.com/13296
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
On all released versions, Get with a literal IPv6 address with a zone identifier fails. For example,
and
return
parse http://[::1%lo0]:8080: hexadecimal escape in host
orparse [::1%lo0]:8080: invalid URL escape "%lo"
error. After the fix of #6530, the former works well but the latter still fails.The text was updated successfully, but these errors were encountered: