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/httptest: httptest on Windows is IPv4-specific #29759

Open
ItsMattL opened this issue Jan 15, 2019 · 1 comment
Open

net/http/httptest: httptest on Windows is IPv4-specific #29759

ItsMattL opened this issue Jan 15, 2019 · 1 comment
Labels
help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows
Milestone

Comments

@ItsMattL
Copy link

What version of Go are you using (go version)?

go version go1.11.1 windows/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

windows/amd64

What did you do?

Run a test leveraging net/http/httptest on a host with IPv6 but without IPv4.

To reproduce:

  1. As administrator, run
    netsh interface ipv4 uninstall
  2. Reboot
  3. Execute an httptest as in https://play.golang.org/p/xlMUEEhgj5s

What did you expect to see?

Test would pass, since the client and server code were both valid, and pass when IPv4 is available.

What did you see instead?

2019/01/15 17:26:59 Get http://[::1]:49679: dial tcp [::1]:49679: failed to find ConnectEx: An address incompatible with the requested protocol was used.

@tklauser tklauser changed the title httptest on Windows is IPv4-specific net/http/httptest: httptest on Windows is IPv4-specific Jan 16, 2019
@tklauser tklauser added OS-Windows NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jan 16, 2019
@gopherbot
Copy link

Change https://golang.org/cl/241137 mentions this issue: net/http/httptest: use IPv6 when IPv4 is unavailable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows
Projects
None yet
Development

No branches or pull requests

5 participants