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: proxy code should know not to proxy 127.0.0.1 #1589

Closed
gopherbot opened this issue Mar 8, 2011 · 6 comments
Closed

net/http: proxy code should know not to proxy 127.0.0.1 #1589

gopherbot opened this issue Mar 8, 2011 · 6 comments

Comments

@gopherbot
Copy link

by scott+ctt@pakin.org:

Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull -u" and retry what you did to
reproduce the problem.  Thanks.

What steps will reproduce the problem?
1. Run "env DISABLE_NET_TESTS=1 ./all.bash" from a machine that's requires a
proxy for remote Web access.
2.
3.

What is the expected output?

The build should pass all of its regression tests.


What do you see instead?

2011/03/07 18:18:43 Test WebSocket server listening on 127.0.0.1:44513
--- FAIL: websocket.TestHTTP (1.0 seconds)
    Get: unexpected success
--- FAIL: websocket.TestHTTPDraft75 (1.0 seconds)
    Get: got status 503
FAIL
make[1]: *** [test] Error 1
make[1]: Leaving directory `/usr/local/stow/go-latest-src/src/pkg/websocket'
make: *** [websocket.test] Error 2

Which compiler are you using (5g, 6g, 8g, gccgo)?

6g

Which operating system are you using?

Ubuntu 10.04.2 LTS

Which revision are you using?  (hg identify)

c5c62aeb6267 release.2011-03-07.1/release

Please provide any additional information below.

If websocket's test program requires external Web access then it
should be added to the 

    # Disable tests that depend on an external network.
    ifeq ($(DISABLE_NET_TESTS),1)
    NOTEST+=http net syslog
    endif

list in src/pkg/Makefile.
@rsc
Copy link
Contributor

rsc commented Mar 8, 2011

Comment 1:

Need to disable the proxy for localhost I bet.

@rsc
Copy link
Contributor

rsc commented Mar 8, 2011

Comment 2:

Status changed to HelpWanted.

@gopherbot
Copy link
Author

Comment 3 by scott+ctt@pakin.org:

Ah, when I un-export my http_proxy environment variable, the build passes its websocket
regression test:
$ pkg/websocket/6.out 
2011/03/08 16:35:38 Test WebSocket server listening on 127.0.0.1:43952
PASS

@rsc
Copy link
Contributor

rsc commented Mar 9, 2011

Comment 4:

Right, we should not use $http_proxy for 127.0.0.1.

@rsc
Copy link
Contributor

rsc commented Apr 20, 2011

Comment 5:

Owner changed to @bradfitz.

Status changed to Accepted.

@bradfitz
Copy link
Contributor

Comment 6:

This issue was closed by revision 8dad7fe.

Status changed to Fixed.

@mikioh mikioh changed the title http: proxy code should know not to proxy 127.0.0.1 net/http: proxy code should know not to proxy 127.0.0.1 Jul 30, 2015
@golang golang locked and limited conversation to collaborators Aug 5, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants