external/curl/UnpackedTarball_curl.mk      |    1 -
 external/curl/statushack.patch.1           |   22 ----------------------
 ucb/source/ucp/webdav-curl/CurlSession.cxx |    5 +----
 3 files changed, 1 insertion(+), 27 deletions(-)

New commits:
commit 4e863ca43c2d402bc25e923c1e960daad3837907
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Wed Oct 19 14:37:48 2022 +0200
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Wed Oct 19 14:37:48 2022 +0200

    Revert "statushack"
    
    This reverts commit 275b318cd55720b1106965c31e8d60619ae50ec9.

diff --git a/external/curl/UnpackedTarball_curl.mk 
b/external/curl/UnpackedTarball_curl.mk
index fae8a67d2bcd..76c8cc34de38 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-disable-protocols.patch.1 \
        external/curl/curl-7.26.0_win-proxy.patch \
        external/curl/zlib.patch.0 \
-       external/curl/statushack.patch.1 \
 ))
 
 ifeq ($(SYSTEM_NSS),)
diff --git a/external/curl/statushack.patch.1 b/external/curl/statushack.patch.1
deleted file mode 100644
index 3d55b896310b..000000000000
--- a/external/curl/statushack.patch.1
+++ /dev/null
@@ -1,22 +0,0 @@
---- curl/lib/http.c.orig       2022-10-10 14:31:12.867898354 +0200
-+++ curl/lib/http.c    2022-10-10 14:31:24.528892930 +0200
-@@ -4213,7 +4213,7 @@
-                     &separator,
-                     &k->httpcode,
-                     &digit4);
--
-+        if(k->httpcode == 401) { k->httpcode = 403; }
-         if(nc == 1 && httpversion_major >= 2 &&
-            2 == sscanf(HEADER1, " HTTP/%1[23] %d", twoorthree, &k->httpcode)) 
{
-           conn->httpversion = 0;
---- curl/lib/http.c.orig       2022-10-10 14:54:55.991225710 +0200
-+++ curl/lib/http.c    2022-10-10 14:55:16.836215787 +0200
-@@ -3576,7 +3576,7 @@
-     if(data->set.get_filetime)
-       data->info.filetime = k->timeofdoc;
-   }
--  else if((checkprefix("WWW-Authenticate:", headp) &&
-+  else if((0 && checkprefix("WWW-Authenticate:", headp) &&
-            (401 == k->httpcode)) ||
-           (checkprefix("Proxy-authenticate:", headp) &&
-            (407 == k->httpcode))) {
diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx 
b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index 8e9c7acafeef..1ae16baa13b4 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -340,7 +340,6 @@ static int debug_callback(CURL* handle, curl_infotype type, 
char* data, size_t s
         {
             // unlike IN, this is all headers in one call
             OString tmp(data, size);
-#if 0
             sal_Int32 const start(tmp.indexOf("Authorization: "));
             if (start != -1)
             {
@@ -350,7 +349,6 @@ static int debug_callback(CURL* handle, curl_infotype type, 
char* data, size_t s
                 tmp = tmp.replaceAt(start + len, end - start - len,
                                     OString::number(end - start - len) + " 
bytes redacted");
             }
-#endif
             SAL_INFO("ucb.ucp.webdav.curl", "CURLINFO_HEADER_OUT: " << handle 
<< ": " << tmp);
             return 0;
         }
@@ -1427,7 +1425,7 @@ auto CurlProcessor::ProcessRequest(
                             ProcessHeaders(headers.HeaderFields.back().first));
                         // X-MSDAVEXT_Error see [MS-WEBDAVE] 2.2.3.1.9
                         auto const it(headerMap.find("x-msdavext_error"));
-                        if (false && (it == headerMap.end() || 
!it->second.startsWith("917656;")))
+                        if (it == headerMap.end() || 
!it->second.startsWith("917656;"))
                         {
                             break;
                         }
@@ -1491,7 +1489,6 @@ auto CurlProcessor::ProcessRequest(
                                                         ? 
CURLINFO_HTTPAUTH_AVAIL
                                                         : 
CURLINFO_PROXYAUTH_AVAIL,
                                                     &authAvail);
-                            authAvail = 0;
                             assert(rc == CURLE_OK);
                             (void)rc;
                             if (statusCode == SC_FORBIDDEN)

Reply via email to