external/curl/UnpackedTarball_curl.mk     |    1 
 external/curl/curl-7.26.0_win-proxy.patch |  121 ------------------------------
 2 files changed, 122 deletions(-)

New commits:
commit 225d8f31ad5fdcb802fbaa4ccb5266c80a3dd037
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Tue May 31 11:43:07 2022 +0200
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Tue May 31 15:59:28 2022 +0200

    curl: remove curl-7.26.0_win-proxy.patch
    
    There is no justification why this patch was added, upstream doesn't
    want to add such a feature[1], and maintaining feature patches in LO
    for bundled externals doesn't make sense.
    
    Also, this doesn't respect the Inet::Settings::ooInetHTTPProxy*
    settings from the configuration.
    
    Let's remove it and hope nobody complains.
    
    [1] https://curl.se/mail/lib-2022-05/0083.html
    
    Change-Id: I1ccdefb76f69e6795a28d4d25bf443555c16ab0b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135182
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/external/curl/UnpackedTarball_curl.mk 
b/external/curl/UnpackedTarball_curl.mk
index b89b000228c9..e78adabb8d07 100644
--- a/external/curl/UnpackedTarball_curl.mk
+++ b/external/curl/UnpackedTarball_curl.mk
@@ -23,7 +23,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,curl,\
        external/curl/curl-msvc.patch.1 \
        external/curl/curl-msvc-zlib.patch.1 \
        external/curl/curl-msvc-disable-protocols.patch.1 \
-       external/curl/curl-7.26.0_win-proxy.patch \
        external/curl/zlib.patch.0 \
        external/curl/configurable-z-option.patch.0 \
 ))
diff --git a/external/curl/curl-7.26.0_win-proxy.patch 
b/external/curl/curl-7.26.0_win-proxy.patch
deleted file mode 100644
index 1c5469a35479..000000000000
--- a/external/curl/curl-7.26.0_win-proxy.patch
+++ /dev/null
@@ -1,121 +0,0 @@
---- curl/winbuild/MakefileBuild.vc.orig        2017-10-23 17:15:22.969492548 
+0200
-+++ curl/winbuild/MakefileBuild.vc     2017-10-23 17:16:38.491490679 +0200
-@@ -72,7 +72,7 @@
- 
- CFLAGS_LIBCURL_STATIC  = /DCURL_STATICLIB
- 
--WIN_LIBS    = ws2_32.lib wldap32.lib advapi32.lib crypt32.lib
-+WIN_LIBS    = ws2_32.lib wldap32.lib advapi32.lib crypt32.lib winhttp.lib
- 
- BASE_NAME              = libcurl
- BASE_NAME_DEBUG        = $(BASE_NAME)_debug
---- 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 */
- 
-+#ifdef _WIN32
-+#include <WinHttp.h>
-+#endif
-+
- #include "urldata.h"
- #include "netrc.h"
- 
-@@ -4586,6 +4590,21 @@
- }
- 
- #ifndef CURL_DISABLE_HTTP
-+#ifdef _WIN32
-+static char *wstrToCstr(LPWSTR wStr)
-+{
-+  int bufSize;
-+  char *out = NULL;
-+  if(wStr) {
-+    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.
-@@ -4613,6 +4633,66 @@
-    * For compatibility, the all-uppercase versions of these variables are
-    * checked if the lowercase versions don't exist.
-    */
-+#ifdef _WIN32
-+  char *no_proxy = NULL;
-+  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 */
-+      if(ieNoProxy) {
-+        no_proxy = strdup(ieNoProxy);
-+        pos = strpbrk(no_proxy, "; ");
-+        while(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;
-+        char *saveptr;
-+
-+        if(ieProxy) {
-+          tok = strtok_s(ieProxy, ";", &saveptr);
-+          if(!strchr(tok, '=')) {
-+            proxy = strdup(ieProxy);
-+          }
-+          else {
-+            do {
-+              if(strncmp(tok, "http=", 5) == 0) {
-+                /* We found HTTP proxy value, then use it */
-+                proxy = strdup(tok + 5);
-+              }
-+              tok = strtok_s(NULL, ";", &saveptr);
-+            }
-+            while(tok);
-+          }
-+        }
-+      }
-+
-+      free(ieProxy);
-+      free(ieNoProxy);
-+    }
-+    else {
-+      /* TODO Handle the Proxy config Auto Detection case */
-+    }
-+
-+    GlobalFree(ieProxyConfig->lpszAutoConfigUrl);
-+    GlobalFree(ieProxyConfig->lpszProxy);
-+    GlobalFree(ieProxyConfig->lpszProxyBypass);
-+  }
-+  free(no_proxy);
-+#else /* !_WIN32 */
-   char proxy_env[128];
-   const char *protop = conn->handler->scheme;
-   char *envp = proxy_env;
-@@ -4663,6 +4739,7 @@
-   }
-   if(proxy)
-     infof(data, "Uses proxy env variable %s == '%s'", envp, proxy);
-+#endif /* _WIN32 */
- 
-   return proxy;
- }

Reply via email to