diff options
author | Giuseppe Castagno <giuseppe.castagno@acca-esse.eu> | 2016-02-01 16:02:16 +0100 |
---|---|---|
committer | Giuseppe Castagno <giuseppe.castagno@acca-esse.eu> | 2016-06-24 12:45:46 +0000 |
commit | 9325c18044a8adc852e2d1b42a5a479ab6195da8 (patch) | |
tree | a9a02a4e5b0a5d1bb75d2afa60189a35a99b3529 /ucb | |
parent | f2f8835bfb1ec57885c94aa2aac8d1a17fc09ed3 (diff) |
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@libreoffice.org>
Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/webdav-neon/webdavcontent.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx index f89a2fc9bde8..3b82bb49a7ba 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 |