Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/http: get for literal ipv6 address url doesn't follow redirection on ipv6-only transport environment #8847

Closed
mikioh opened this issue Oct 1, 2014 · 8 comments

Comments

Projects
None yet
5 participants
@mikioh
Copy link
Contributor

commented Oct 1, 2014

theoretically the root cause must be golang.org/issue/8453, but file a separate issue
for safety. for now workaround would be having a custom transport like the following:

tr := &http.Transport{
        Dial: (&net.Dialer{DualStack: true}).Dial,
}
client := http.Client{Transport: tr}
resp, err := client.Get(fmt.Sprintf("http://[2404:6800:4004:802::1011]:80/")
@bradfitz

This comment has been minimized.

Copy link
Member

commented Oct 1, 2014

Comment 1:

I have no clue what this bug is trying to say.
In particular, what is "or some ipv6 transition mech enabled environment"?
Please write a complete description with examples.

Owner changed to @mikioh.

Status changed to WaitingForReply.

@mikioh

This comment has been minimized.

Copy link
Contributor Author

commented Oct 1, 2014

Comment 2:

when we run attached on ipv6 enabled, ipv6-only transport environment, we will have
network is unreachable error because of issue #8453.
fetch from www.google.com, 2404:6800:4004:807::1013 failed: Get http://www.google.com/:
dial tcp 74.125.235.83:80: network is unreachable
because, when the server returns 301 or 302 and the response contains non-literal ip
address location,  current net.Dial variants prefer ipv4 transport unconditionally and
never attempts other a/aaaa records as described in issue #8453.
> what is "or some ipv6 transition mech enabled environment"?
never mind, i misconfigured dns64+a/aaaa filter.

Attachments:

  1. http.go (882 bytes)
@mikioh

This comment has been minimized.

Copy link
Contributor Author

commented Oct 1, 2014

Comment 3:

Status changed to New.

Attachments:

  1. http.go (800 bytes)
@mikioh

This comment has been minimized.

Copy link
Contributor Author

commented Oct 1, 2014

Comment 4:

fwiw,
> what is "or some ipv6 transition mech enabled environment"?
i mean, a environment which is deployed either ipv4-ipv6 translation techniques such as
nat64/xlat464/ds-lite/map-t or ipv4-ipv6 tunnelling techniques such as 6rd/4rd/map-e. in
any case control plane bridging stuff btw web and ip, dns and/or dns64, is pretty
important.
@griesemer

This comment has been minimized.

Copy link
Contributor

commented Oct 1, 2014

Comment 5:

Labels changed: added repo-main.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Apr 10, 2015

Not sure what the status is here, but Brad, Mikio replied to your questions.

@rsc rsc added this to the Go1.5Maybe milestone Apr 10, 2015

@mikioh

This comment has been minimized.

Copy link
Contributor Author

commented Apr 14, 2015

#8453 will fix this together, but please keep this open for now. Perhaps we need a test case that runs http.Get/http.Client.Get for www.google.com over only IPv6 transport.

@gopherbot

This comment has been minimized.

Copy link

commented Jun 4, 2015

CL https://golang.org/cl/8768 mentions this issue.

@gopherbot gopherbot closed this in 0d8366e Jun 16, 2015

@mikioh mikioh modified the milestones: Go1.5, Go1.5Maybe Jun 16, 2015

@golang golang locked and limited conversation to collaborators Jun 25, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.