[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 72/178: proxy: show getenv proxy use in verbose out
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 72/178: proxy: show getenv proxy use in verbose output |
Date: |
Wed, 23 May 2018 12:25:07 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 85eea2fb3875e5e031caef70127d7632632f6ba5
Author: Daniel Stenberg <address@hidden>
AuthorDate: Tue Apr 10 21:30:28 2018 +0200
proxy: show getenv proxy use in verbose output
... to aid debugging etc as it sometimes isn't immediately obvious why
curl uses or doesn't use a proxy.
Inspired by #2477
Closes #2480
---
lib/url.c | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/lib/url.c b/lib/url.c
index feb1fa70f..8c9c69141 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2662,13 +2662,19 @@ static char *detect_proxy(struct connectdata *conn)
prox = curl_getenv(proxy_env);
}
- if(prox)
+ envp = proxy_env;
+ if(prox) {
proxy = prox; /* use this */
+ }
else {
- proxy = curl_getenv("all_proxy"); /* default proxy to use */
- if(!proxy)
- proxy = curl_getenv("ALL_PROXY");
+ envp = (char *)"all_proxy";
+ proxy = curl_getenv(envp); /* default proxy to use */
+ if(!proxy) {
+ envp = (char *)"ALL_PROXY";
+ proxy = curl_getenv(envp);
+ }
}
+ infof(conn->data, "Uses proxy env variable %s == '%s'\n", envp, proxy);
return proxy;
}
@@ -2953,9 +2959,15 @@ static CURLcode create_conn_helper_init_proxy(struct
connectdata *conn)
}
if(!data->set.str[STRING_NOPROXY]) {
- no_proxy = curl_getenv("no_proxy");
- if(!no_proxy)
- no_proxy = curl_getenv("NO_PROXY");
+ const char *p = "no_proxy";
+ no_proxy = curl_getenv(p);
+ if(!no_proxy) {
+ p = "NO_PROXY";
+ no_proxy = curl_getenv(p);
+ }
+ if(no_proxy) {
+ infof(conn->data, "Uses proxy env variable %s == '%s'\n", p, no_proxy);
+ }
}
if(check_noproxy(conn->host.name, data->set.str[STRING_NOPROXY] ?
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 115/178: mime: avoid NULL pointer dereference risk, (continued)
- [GNUnet-SVN] [gnurl] 115/178: mime: avoid NULL pointer dereference risk, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 129/178: TODO: Support the clienthello extension, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 131/178: KNOWN_BUGS: Connection information when using TCP Fast Open, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 136/178: wolfssl: Fix non-blocking connect, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 76/178: checksrc: Fix typo, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 63/178: examples/sftpuploadresmue: Fix Windows large file seek, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 71/178: travis: build libpsl and make builds use it, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 78/178: vauth: Fix typo, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 81/178: urldata: make service names unconditional, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 67/178: winbuild: fix URL, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 72/178: proxy: show getenv proxy use in verbose output,
gnunet <=
- [GNUnet-SVN] [gnurl] 87/178: RELEASE-NOTES: synced, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 91/178: http2: handle on_begin_headers() called more than once, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 120/178: configure: provide --with-wolfssl as an alias for --with-cyassl, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 75/178: all: Refactor malloc+memset to use calloc, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 83/178: ntlm_sspi: fix authentication using Credential Manager, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 111/178: examples/sftpuploadresume: typecast fseek argument to long, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 95/178: openssl: fix subjectAltName check on non-ASCII platforms, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 117/178: cookies: ensure that we have cookies before writing jar, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 106/178: RELEASE-NOTES: synced, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 98/178: http2: handle GOAWAY properly, gnunet, 2018/05/23