diff options
author | Brad Fitzpatrick <bradfitz@golang.org> | 2014-09-24 17:39:00 -0700 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2014-09-24 17:39:00 -0700 |
commit | 29ea6456c72c8b6b7f1b5902441ea8ff4c50e65a (patch) | |
tree | a5c697bcdda85433aa84c78a003022b8595d6d7c | |
parent | 585e8aa6783c384aedb61f5c7f27e7c9e0887926 (diff) | |
download | go-29ea6456c72c8b6b7f1b5902441ea8ff4c50e65a.tar.gz |
net/http: update ProxyFromEnvironment docs for HTTPS_PROXY addition
LGTM=adg
R=adg
CC=golang-codereviews
https://codereview.appspot.com/142650043
-rw-r--r-- | src/net/http/transport.go | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/net/http/transport.go b/src/net/http/transport.go index 6be341faa..f1a683752 100644 --- a/src/net/http/transport.go +++ b/src/net/http/transport.go @@ -116,10 +116,17 @@ type Transport struct { // ProxyFromEnvironment returns the URL of the proxy to use for a // given request, as indicated by the environment variables -// $HTTP_PROXY and $NO_PROXY (or $http_proxy and $no_proxy). -// An error is returned if the proxy environment is invalid. +// HTTP_PROXY, HTTPS_PROXY and NO_PROXY (or the lowercase versions +// thereof). HTTPS_PROXY takes precedence over HTTP_PROXY for https +// requests. +// +// The environment values may be either a complete URL or a +// "host[:port]", in which case the "http" scheme is assumed. +// An error is returned if the value is a different form. +// // A nil URL and nil error are returned if no proxy is defined in the -// environment, or a proxy should not be used for the given request. +// environment, or a proxy should not be used for the given request, +// as defined by NO_PROXY. // // As a special case, if req.URL.Host is "localhost" (with or without // a port number), then a nil URL and nil error will be returned. |