summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Castagno <giuseppe.castagno@acca-esse.eu>2016-02-01 15:53:13 +0100
committerGiuseppe Castagno <giuseppe.castagno@acca-esse.eu>2016-06-24 13:53:10 +0000
commit639aa16945f1280716b3d3cb44ebf90eab416887 (patch)
tree145a37cdefc33a7a87b97a2ff8647ae514348ed4
parent9325c18044a8adc852e2d1b42a5a479ab6195da8 (diff)
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@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
-rw-r--r--ucb/source/ucp/webdav-neon/NeonHeadRequest.cxx4
-rw-r--r--ucb/source/ucp/webdav-neon/NeonSession.cxx4
2 files changed, 6 insertions, 2 deletions
diff --git a/ucb/source/ucp/webdav-neon/NeonHeadRequest.cxx b/ucb/source/ucp/webdav-neon/NeonHeadRequest.cxx
index 0d399083cd9b..c74f6dff4fc4 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 6a4bce97679a..df3cd7524c4a 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();