]> Cypherpunks repositories - gostls13.git/commit
net/http: don't send IPv6 zone identifier in outbound request, per RFC 6874
authorMikio Hara <mikioh.mikioh@gmail.com>
Wed, 21 Jan 2015 10:27:34 +0000 (19:27 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Thu, 9 Apr 2015 09:26:52 +0000 (09:26 +0000)
commit957255f5ab1ca4aff3195a20b80fe2aa4eb9e336
tree46c339093e1054f689410b298f7e4272bc6e7f51
parent92c57363e0b4d193c4324e2af6902fe56b7524a0
net/http: don't send IPv6 zone identifier in outbound request, per RFC 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.

Fixes #9544.

Change-Id: I7406bd0aa961d260d96f1f887c2e45854e921452
Reviewed-on: https://go-review.googlesource.com/3111
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/http/request.go
src/net/http/request_test.go
src/net/http/requestwrite_test.go