-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: not using proxy for https get #2919
Comments
Comment 2 by raul.san@sent.com: http_proxy=127.0.0.1:8118 |
Comment 5 by raul.san@sent.com: http_proxy doesn't require the "http://" prefix. Since I have always used with tools like curl, wget, git in github.com, ... $ go get -v github.com/dchest/uniuri github.com/dchest/uniuri But it only faills at getting code from code.google.com $ go get code.google.com/p/leveldb-go/leveldb code.google.com/p/leveldb-go/leveldb: Get https://code.google.com/p/leveldb-go/source/checkout?repo=: invalid proxy address |
Comment 6 by raul.san@sent.com: To use it in "code.google.com" I've to add the prefix. I've no problem in add it but it's strange that it can be used in github.com without it. |
This issue was closed by revision fb2caa3. Status changed to Fixed. |
Comment 9 by raul.san@sent.com: I just test it using the lastest weekly, weekly.2012-02-22 $ export http_proxy=127.0.0.1:8118 $ go get -v github.com/nf/stat github.com/nf/stat (download) github.com/nf/stat $ go get -v bitbucket.org/tebeka/selenium bitbucket.org/tebeka/selenium: Get https://api.bitbucket.org/1.0/repositories/tebeka/selenium: http: error connecting to proxy 127.0.0.1:8118: dial tcp <nil>:0: connection refused $ go get -v launchpad.net/gocheck launchpad.net/gocheck (download) # cd .; bzr branch https://launchpad.net/gocheck /var/tmp/go-3pkg/src/launchpad.net/gocheck bzr: ERROR: Invalid url supplied to transport: "127.0.0.1:8118": No host component launchpad.net/gocheck: exit status 3 // * * * $ export http_proxy=http://127.0.0.1:8118 $ go get -v bitbucket.org/tebeka/selenium bitbucket.org/tebeka/selenium (download) bitbucket.org/tebeka/selenium $ go get -v launchpad.net/gocheck launchpad.net/gocheck (download) launchpad.net/gocheck |
Owner changed to builder@golang.org. |
I can reproduce. Will investigate. Owner changed to @bradfitz. |
Comment 14 by raul.san@sent.com: I just test that path set: --- FAIL: TestProxyFromEnvironment (0.00 seconds) transport_test.go:752: 0. got error = "invalid proxy address \"127.0.0.1:8080\": <nil>", want "<nil>" FAIL * * * go version weekly.2012-02-22 +c8afb6fb97a0 |
Comment 16 by raul.san@sent.com: Re 15: I used that tip version like base, and then, I added the lastest set patch (4) |
*** Submitted as http://code.google.com/p/go/source/detail?r=22a735929e40 *** net/http: fix ProxyFromEnvironment bug, docs, add tests Fixes issue #2919 I believe. (gets as far as sending a CONNECT request to my little dummy logging proxy that doesn't actually support CONNECT now.) Untested with a real CONNECT-supporting proxy, though. R=golang-dev, rsc CC=golang-dev http://golang.org/cl/5708055 Status changed to Fixed. |
Comment 18 by raul.san@sent.com: I've tested in tip release: go version weekly.2012-02-22 +9dd9374109a9 and it passes all tests but it faills with launchpad (it works now in bitbucket) $ export http_proxy=127.0.0.1:8118 $ go get -v github.com/nf/stat github.com/nf/stat (download) github.com/nf/stat $ go get -v bitbucket.org/tebeka/selenium bitbucket.org/tebeka/selenium (download) bitbucket.org/tebeka/selenium $ go get -v launchpad.net/gocheck launchpad.net/gocheck (download) # cd .; bzr branch https://launchpad.net/gocheck /var/tmp/go-3pkg/src/launchpad.net/gocheck bzr: ERROR: Invalid url supplied to transport: "127.0.0.1:8118": No host component package launchpad.net/gocheck: exit status 3 |
Comment 20 by raul.san@sent.com: Re 19: yes, it supports. Read at the end in https://golang.org/issue/2919?c=9 |
Comment 21 by raul.san@sent.com: I've tested again with the last weekly, and I can confirm that it only fails with "launchpad.net". * I didn't test code.google.com but it's ok: $ export http_proxy=127.0.0.1:8118 $ go get -v code.google.com/p/go.codereview/git85 code.google.com/p/go.codereview (download) code.google.com/p/go.codereview/git85 $ go get -v launchpad.net/gocheck launchpad.net/gocheck (download) # cd .; bzr branch https://launchpad.net/gocheck /var/tmp/go-3pkg/src/launchpad.net/gocheck bzr: ERROR: Invalid url supplied to transport: "127.0.0.1:8118": No host component package launchpad.net/gocheck: exit status 3 $ export http_proxy=http://127.0.0.1:8118 $ go get -v launchpad.net/gocheck launchpad.net/gocheck (download) launchpad.net/gocheck When it's added "http://" to the variable then it's downloaded but it takes a long time, a lot of more time than the another repositories. |
This is fixed. The error you are seeing comes form bzr, not from the go command. Your http_proxy really should be a URL. We have allowed plain host:port in the go command and Go http libraries, but not all tools accept that. In particular, bzr does not: $ http_proxy=127.0.0.1:8000 bzr branch https://launchpad.net/gocheck /tmp/gocheck bzr: ERROR: Invalid url supplied to transport: "127.0.0.1:8000": No host component $ This has nothing to do with the go command. If you think this behavior is wrong, please file a bug with the bzr authors. |
by raul.san@sent.com:
The text was updated successfully, but these errors were encountered: