framework/source/loadenv/loadenv.cxx                       |    3 ++-
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |    6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 6334daf8db2e54838bc3dca16199f2bf1291ceac
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Tue Apr 27 06:15:16 2021 +0300
Commit:     Michael Stahl <michael.st...@collabora.com>
CommitDate: Mon Jul 14 15:27:47 2025 +0200

    tdf#141164: Add an expert config for WebDAV redirection detection
    
    Since commit 20b1e6440aacab043753e93be4499e939a80b05b, we detect
    redirected WebDAV paths, and substitute them with original WebDAV
    URLs to allow retrieving additional information like lock owner.
    
    The new officecfg::Office::Common::Load::DetectWebDAVRedirection
    allows to disable the detection, and opt to older way of use of
    Windows Redirector, taking advantage of its cookie handling until
    we implement own proper cookie handling.
    
    Change-Id: I1510a016f40dbe81dcba9aa4fd50eda73a6d9f22
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114686
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    (cherry picked from commit a3843f1cb0095e843bc4ee7ed20802147f63c7ba)

diff --git a/framework/source/loadenv/loadenv.cxx 
b/framework/source/loadenv/loadenv.cxx
index 3d04e17a23c2..b4fd1d66b196 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -251,7 +251,8 @@ void LoadEnv::startLoading(const OUString& sURL, const 
uno::Sequence<beans::Prop
     m_bLoaded = false;
 
     OUString aRealURL;
-    if (!tools::IsMappedWebDAVPath(sURL, &aRealURL))
+    if (!officecfg::Office::Common::Load::DetectWebDAVRedirection::get()
+        || !tools::IsMappedWebDAVPath(sURL, &aRealURL))
         aRealURL = sURL;
 
     // try to find out, if it's really a content, which can be loaded or must 
be "handled"
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 18485882dd32..04a286bce5b3 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -2519,6 +2519,12 @@
         </info>
         <value>true</value>
       </prop>
+      <prop oor:name="DetectWebDAVRedirection" oor:type="xs:boolean" 
oor:nillable="false">
+        <info>
+          <desc>Determines whether to use WebDAV when a file is loaded from a 
mapped WebDAV drive.</desc>
+        </info>
+        <value>true</value>
+      </prop>
     </group>
     <group oor:name="Security">
       <info>

Reply via email to