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: $no_proxy handling requires domains to be prefixed with a . #4574

Closed
kisielk opened this issue Dec 19, 2012 · 2 comments
Closed

net/http: $no_proxy handling requires domains to be prefixed with a . #4574

kisielk opened this issue Dec 19, 2012 · 2 comments
Milestone

Comments

@kisielk
Copy link
Contributor

kisielk commented Dec 19, 2012

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. export no_proxy=example.com
2. run a go program that connects to foo.example.com via http

What is the expected output?
request bypasses the proxy

What do you see instead?
request hits the proxy. setting no_proxy=.example.com causes the proxy to be bypassed.

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


Which operating system are you using?
Linux or MacOS

Which version are you using?  (run 'go version')
1.0.3 or 0c135754c93a

Please provide any additional information below.

This is counter to the implementation of no_proxy handling in other common places. For
example, Python:

http://hg.python.org/cpython/file/c744b6f8a09a/Lib/urllib/request.py#l2381

or curl actually handles both cases, but the dot-prefixed version appears to be for
legacy purposes:

https://github.com/bagder/curl/blob/master/lib/url.c#L3936

The relevant part in the Go standard library appears to be
http://code.google.com/p/go/source/browse/src/pkg/net/http/transport.go#453
@bradfitz
Copy link
Contributor

Comment 1:

https://golang.org/cl/7005049

Labels changed: removed priority-triage.

Status changed to Started.

@bradfitz
Copy link
Contributor

Comment 2:

This issue was closed by revision 82ae643.

Status changed to Fixed.

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 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

4 participants