[Libreoffice-commits] core.git: ucb/source
Giuseppe Castagno
giuseppe.castagno at acca-esse.eu
Fri Jun 24 12:46:10 UTC 2016
ucb/source/ucp/webdav-neon/webdavcontent.cxx | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
New commits:
commit 9325c18044a8adc852e2d1b42a5a479ab6195da8
Author: Giuseppe Castagno <giuseppe.castagno at acca-esse.eu>
Date: Mon Feb 1 16:02:16 2016 +0100
In case of Web site access, add Content-Type to HEAD request.
This remove a necessity for another HEAD request when MediaType
is requested while accessing a Web site, a cleaner implementation of
d61352f58a7f750d3b0b0a9c2d6498fbb7a6e10d.
This behavior is active only on a standard Web site, when PROPFIND
failed earlier on the program flow, without retrieving the property
DAV:getcontenttype.
Change-Id: I60456f9ad8746c3cba3c070218243adef0c0dd01
Reviewed-on: https://gerrit.libreoffice.org/26605
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/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index f89a2fc..3b82bb4 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -1364,9 +1364,6 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
if ( bNetworkAccessAllowed )
{
- if( eType != DAV )
- m_bDidGetOrHead = false;
-
// All properties obtained already?
std::vector< OUString > aMissingProps;
if ( !( xProps.get()
@@ -1382,6 +1379,14 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
rProperties,
aHeaderNames );
+ if( eType != DAV )
+ {
+ // in case of not DAV PROFIND (previously in program flow) failed
+ // so we need to add the only prop that's common
+ // to DAV and NON_DAV: MediaType, that maps to Content-Type
+ aHeaderNames.push_back( "Content-Type" );
+ }
+
if ( !aHeaderNames.empty() )
{
try
More information about the Libreoffice-commits
mailing list