Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
d912979b
Kaydet (Commit)
d912979b
authored
Ock 21, 2013
tarafından
Cédric Bosdonnat
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
curl: patched to read IE proxy settings on Windows
Change-Id: I46605f6c8dfacab0feb5a446db458eed8e5756ee
üst
862f694f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
125 additions
and
0 deletions
+125
-0
UnpackedTarball_curl.mk
curl/UnpackedTarball_curl.mk
+1
-0
curl-7.26.0_win-proxy.patch
curl/curl-7.26.0_win-proxy.patch
+124
-0
No files found.
curl/UnpackedTarball_curl.mk
Dosyayı görüntüle @
d912979b
...
@@ -23,6 +23,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,curl,\
...
@@ -23,6 +23,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,curl,\
curl/curl-aix.patch \
curl/curl-aix.patch \
curl/curl-7.26.0_win.patch \
curl/curl-7.26.0_win.patch \
curl/curl-7.26.0_mingw.patch \
curl/curl-7.26.0_mingw.patch \
curl/curl-7.26.0_win-proxy.patch \
))
))
ifeq ($(OS),ANDROID)
ifeq ($(OS),ANDROID)
$(eval $(call gb_UnpackedTarball_add_patches,curl,\
$(eval $(call gb_UnpackedTarball_add_patches,curl,\
...
...
curl/curl-7.26.0_win-proxy.patch
0 → 100644
Dosyayı görüntüle @
d912979b
--- curl-7.26.0/lib/Makefile.vc9
+++ misc/build/curl-7.26.0/lib/Makefile.vc9
@@ -116,7 +116,7 @@ LFLAGS = /nologo /machine:$(MACHINE)
SSLLIBS = libeay32.lib ssleay32.lib
ZLIBLIBSDLL= zdll.lib
ZLIBLIBS = zlib.lib
-WINLIBS = ws2_32.lib wldap32.lib
+WINLIBS = ws2_32.lib wldap32.lib winhttp.lib
CFLAGS = $(CFLAGS) $(EXCFLAGS)
CFGSET = FALSE
--- curl-7.26.0/lib/url.c
+++ misc/build/curl-7.26.0/lib/url.c
@@ -80,6 +80,10 @@ void idn_free (void *ptr);
int curl_win32_idn_to_ascii(const char *in, char **out);
#endif /* USE_LIBIDN */
+#ifdef WIN32
+#include <WinHttp.h>
+#endif
+
#include "urldata.h"
#include "netrc.h"
@@ -4111,6 +4115,21 @@ static bool check_noproxy(const char* name, const char* no_proxy)
return FALSE;
}
+#ifdef WIN32
+static char* wstrToCstr( LPWSTR wStr )
+{
+ int bufSize;
+ char* out = NULL;
+ if ( wStr != NULL )
+ {
+ bufSize = WideCharToMultiByte( CP_ACP, 0, wStr, -1, NULL, 0, NULL, NULL );
+ out = ( char* )malloc( bufSize * sizeof(char));
+ WideCharToMultiByte( CP_ACP, 0, wStr, -1, out, bufSize, NULL, NULL );
+ }
+ return out;
+}
+#endif
+
/****************************************************************
* Detect what (if any) proxy to use. Remember that this selects a host
* name and is not limited to HTTP proxies only.
@@ -4119,6 +4138,7 @@ static bool check_noproxy(const char* name, const char* no_proxy)
static char *detect_proxy(struct connectdata *conn)
{
char *proxy = NULL;
+ char *no_proxy=NULL;
#ifndef CURL_DISABLE_HTTP
/* If proxy was not specified, we check for default proxy environment
@@ -4138,7 +4158,57 @@ static char *detect_proxy(struct connectdata *conn)
* For compatibility, the all-uppercase versions of these variables are
* checked if the lowercase versions don't exist.
*/
- char *no_proxy=NULL;
+#ifdef WIN32
+ WINHTTP_CURRENT_USER_IE_PROXY_CONFIG *ieProxyConfig;
+ ieProxyConfig = (WINHTTP_CURRENT_USER_IE_PROXY_CONFIG*)malloc(sizeof(WINHTTP_CURRENT_USER_IE_PROXY_CONFIG));
+ if(WinHttpGetIEProxyConfigForCurrentUser(ieProxyConfig)) {
+ if(!ieProxyConfig->fAutoDetect) {
+ char *ieProxy;
+ char *ieNoProxy;
+ char* pos;
+
+ ieProxy = wstrToCstr(ieProxyConfig->lpszProxy);
+ ieNoProxy = wstrToCstr(ieProxyConfig->lpszProxyBypass);
+
+ /* Convert the ieNoProxy into a proper no_proxy value */
+ no_proxy = strdup(ieNoProxy);
+ pos = strpbrk(no_proxy, "; ");
+ while (NULL != pos) {
+ no_proxy[pos-no_proxy] = ',';
+ pos = strpbrk(no_proxy, "; ");
+ }
+
+ if(!check_noproxy(conn->host.name, no_proxy)) {
+ /* Look for the http proxy setting */
+ char* tok;
+
+ tok = strtok(ieProxy, ";");
+ if(strchr(tok, '=') == NULL) {
+ proxy = strdup(ieProxy);
+ }
+ else {
+ do {
+ if(strncmp(tok, "http=", 5) == 0) {
+ /* We found HTTP proxy value, then use it */
+ proxy = strdup( tok + 5 );
+ }
+ }
+ while(NULL != strtok(NULL, ";"));
+ }
+ }
+
+ free(ieProxy);
+ free(ieNoProxy);
+ }
+ else {
+ /* TODO Handle the Proxy config Auto Detection case */
+ }
+
+ GlobalFree( ieProxyConfig->lpszAutoConfigUrl );
+ GlobalFree( ieProxyConfig->lpszProxy );
+ GlobalFree( ieProxyConfig->lpszProxyBypass );
+ }
+#else /* !WIN32 */
char proxy_env[128];
no_proxy=curl_getenv("no_proxy");
@@ -4189,9 +4259,9 @@ static char *detect_proxy(struct connectdata *conn)
}
} /* if(!check_noproxy(conn->host.name, no_proxy)) - it wasn't specified
non-proxy */
+#endif /* WIN32 */
if(no_proxy)
free(no_proxy);
-
#else /* !CURL_DISABLE_HTTP */
(void)conn;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment