Skip to content

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

Closed
@mikioh

Description

@mikioh
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/")

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions