diff options
Diffstat (limited to 'external/curl/curl-7.26.0_win-proxy.patch')
-rw-r--r-- | external/curl/curl-7.26.0_win-proxy.patch | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/external/curl/curl-7.26.0_win-proxy.patch b/external/curl/curl-7.26.0_win-proxy.patch index 852881570e36..62016a70e8a0 100644 --- a/external/curl/curl-7.26.0_win-proxy.patch +++ b/external/curl/curl-7.26.0_win-proxy.patch @@ -12,18 +12,18 @@ --- curl-7.26.0/lib/url.c +++ misc/build/curl-7.26.0/lib/url.c @@ -78,6 +78,10 @@ - bool curl_win32_idn_to_ascii(const char *in, char **out); - #endif /* USE_LIBIDN2 */ + + #include <limits.h> +#ifdef _WIN32 +#include <WinHttp.h> +#endif + + #include "doh.h" #include "urldata.h" #include "netrc.h" - @@ -4586,6 +4590,21 @@ - } + #ifndef CURL_DISABLE_PROXY #ifndef CURL_DISABLE_HTTP +#ifdef _WIN32 @@ -31,7 +31,7 @@ +{ + int bufSize; + char *out = NULL; -+ if(wStr != NULL) { ++ if(wStr) { + bufSize = WideCharToMultiByte( + CP_ACP, 0, wStr, -1, NULL, 0, NULL, NULL); + out = (char *)malloc(bufSize * sizeof(char)); @@ -44,7 +44,7 @@ /**************************************************************** * Detect what (if any) proxy to use. Remember that this selects a host * name and is not limited to HTTP proxies only. -@@ -4613,6 +4633,66 @@ +@@ -4613,6 +4633,67 @@ * For compatibility, the all-uppercase versions of these variables are * checked if the lowercase versions don't exist. */ @@ -58,28 +58,29 @@ + char *ieProxy; + char *ieNoProxy; + char *pos; ++ bool spacesp; + + ieProxy = wstrToCstr(ieProxyConfig->lpszProxy); + ieNoProxy = wstrToCstr(ieProxyConfig->lpszProxyBypass); + + /* Convert the ieNoProxy into a proper no_proxy value */ -+ if(NULL != ieNoProxy) { ++ if(ieNoProxy) { + no_proxy = strdup(ieNoProxy); + pos = strpbrk(no_proxy, "; "); -+ while(NULL != pos) { ++ while(pos) { + no_proxy[pos-no_proxy] = ','; + pos = strpbrk(no_proxy, "; "); + } + } + -+ if(!check_noproxy(conn->host.name, no_proxy)) { ++ if(!Curl_check_noproxy(conn->host.name, no_proxy, &spacesp)) { + /* Look for the http proxy setting */ + char *tok; + char *saveptr; + -+ if(NULL != ieProxy) { ++ if(ieProxy) { + tok = strtok_s(ieProxy, ";", &saveptr); -+ if(strchr(tok, '=') == NULL) { ++ if(!strchr(tok, '=')) { + proxy = strdup(ieProxy); + } + else { @@ -90,7 +91,7 @@ + } + tok = strtok_s(NULL, ";", &saveptr); + } -+ while(NULL != tok); ++ while(tok); + } + } + } @@ -114,7 +115,7 @@ @@ -4663,6 +4739,7 @@ } if(proxy) - infof(conn->data, "Uses proxy env variable %s == '%s'\n", envp, proxy); + infof(data, "Uses proxy env variable %s == '%s'", envp, proxy); +#endif /* _WIN32 */ return proxy; |