Skip to content

net/http: Transport should de-UTF-8 hostname in Host header #13686

Closed
@bradfitz

Description

@bradfitz

From golang-nuts, a test was failing in Go 1.6 against httptest.Server because of a unit test line:

    {"http://Doppel.Gänger/foo_Bar-Foo", []byte(`T€st Cont€nt 123`), false},

I suspect the http client is sending the "ä" as literal UTF-8 bytes in the Host header, not as punycode or whatever.

Activity

self-assigned this
on Dec 18, 2015
added this to the Go1.6 milestone on Dec 18, 2015
odeke-em

odeke-em commented on Dec 19, 2015

@odeke-em
Member

@bradfitz which file/lines should this test be added to reproduce it? Or even the link, please?

rsc

rsc commented on Jan 6, 2016

@rsc
Contributor

We've lived a long time without this. We don't need to rush it into Go 1.6. Let's figure it out for Go 1.7. It's a huge topic.

modified the milestones: Go1.7Early, Go1.6 on Jan 6, 2016
modified the milestones: Go1.8Early, Go1.7Early on May 5, 2016
bradfitz

bradfitz commented on May 5, 2016

@bradfitz
ContributorAuthor

Didn't happen for 1.7.

rsc

rsc commented on Sep 26, 2016

@rsc
Contributor

Brad, is this NeedsFix or NeedsDecision? Still for Go 1.8?

bradfitz

bradfitz commented on Sep 26, 2016

@bradfitz
ContributorAuthor

I did IDNA/Punycode already for Go 1.8. This was fixed by https://golang.org/cl/29072 (git rev b7e5303)

locked and limited conversation to collaborators on Sep 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @bradfitz@rsc@odeke-em@gopherbot

        Issue actions

          net/http: Transport should de-UTF-8 hostname in Host header · Issue #13686 · golang/go