]> Cypherpunks repositories - gostls13.git/commit
net/http: make Transport support international domain names
authorBrad Fitzpatrick <bradfitz@golang.org>
Sun, 11 Sep 2016 02:00:38 +0000 (02:00 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 13 Sep 2016 19:25:50 +0000 (19:25 +0000)
commitb7e53038b8abb4d82cf25cb844395af602150a29
treedea201d31ef7d1c47cc9908eada63cb2b69e089f
parent802cb5927f1e163749331c9f6cfb414cb0c753b9
net/http: make Transport support international domain names

This CL makes code like this work:

     res, err := http.Get("https://фу.бар/баз")

So far, IDNA support is limited to the http1 and http2 Transports.
The http package is currently responsible for converting domain names
into Punycode before calling the net layer. The http package also has
to Punycode-ify the hostname for the Host & :authority headers for
HTTP/1 and HTTP/2, respectively.

No automatic translation from Punycode back to Unicode is performed,
per Go's historical behavior. Docs are updated where relevant.  No
changes needed to the Server package. Things are already in ASCII
at that point.

No changes to the net package, at least yet.

Updates x/net/http2 to git rev 57c7820 for https://golang.org/cl/29071

Updates #13835

Change-Id: I1e9a74c60d00a197ea951a9505da5c3c3187099b
Reviewed-on: https://go-review.googlesource.com/29072
Reviewed-by: Chris Broadfoot <cbro@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/net/http/http_test.go
src/net/http/request.go
src/net/http/transport.go
src/net/http/transport_test.go