[Libreoffice-commits] core.git: ucb/source

Giuseppe Castagno giuseppe.castagno at acca-esse.eu
Fri Jun 24 13:53:33 UTC 2016


 ucb/source/ucp/webdav-neon/NeonHeadRequest.cxx |    4 +++-
 ucb/source/ucp/webdav-neon/NeonSession.cxx     |    4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 639aa16945f1280716b3d3cb44ebf90eab416887
Author: Giuseppe Castagno <giuseppe.castagno at acca-esse.eu>
Date:   Mon Feb 1 15:53:13 2016 +0100

    Force lowercase on WebDAV received header names.
    
    Header names are case insensitive, some server uses mixed case
    instead.
    
    Change-Id: I0c3d70edabf9ca5ceec0158be99351bf93249461
    Reviewed-on: https://gerrit.libreoffice.org/26601
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Giuseppe Castagno <giuseppe.castagno at acca-esse.eu>

diff --git a/ucb/source/ucp/webdav-neon/NeonHeadRequest.cxx b/ucb/source/ucp/webdav-neon/NeonHeadRequest.cxx
index 0d39908..c74f6df 100644
--- a/ucb/source/ucp/webdav-neon/NeonHeadRequest.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonHeadRequest.cxx
@@ -99,7 +99,9 @@ void process_headers( ne_request * req,
         {
             // Create & set the PropertyValue
             DAVPropertyValue thePropertyValue;
-            thePropertyValue.Name = aHeaderName;
+            // header names are case insensitive, so are the
+            // corresponding property names
+            thePropertyValue.Name = aHeaderName.toAsciiLowerCase();
             thePropertyValue.IsCaseSensitive = false;
             thePropertyValue.Value <<= aHeaderValue;
 
diff --git a/ucb/source/ucp/webdav-neon/NeonSession.cxx b/ucb/source/ucp/webdav-neon/NeonSession.cxx
index 6a4bce9..df3cd75 100644
--- a/ucb/source/ucp/webdav-neon/NeonSession.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonSession.cxx
@@ -1826,8 +1826,10 @@ void runResponseHeaderHandler( void * userdata,
         {
             // Create & set the PropertyValue
             DAVPropertyValue thePropertyValue;
+            // header names are case insensitive, so are the
+            // corresponding property names.
+            thePropertyValue.Name = aHeaderName.toAsciiLowerCase();
             thePropertyValue.IsCaseSensitive = false;
-            thePropertyValue.Name = aHeaderName;
 
             if ( nPos < aHeader.getLength() )
                 thePropertyValue.Value <<= aHeader.copy( nPos + 1 ).trim();


More information about the Libreoffice-commits mailing list