Kaydet (Commit) 9325c180 authored tarafından Giuseppe Castagno's avatar Giuseppe Castagno

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
d61352f5.

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/26605Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarGiuseppe Castagno <giuseppe.castagno@acca-esse.eu>
üst f2f8835b
...@@ -1364,9 +1364,6 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( ...@@ -1364,9 +1364,6 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
if ( bNetworkAccessAllowed ) if ( bNetworkAccessAllowed )
{ {
if( eType != DAV )
m_bDidGetOrHead = false;
// All properties obtained already? // All properties obtained already?
std::vector< OUString > aMissingProps; std::vector< OUString > aMissingProps;
if ( !( xProps.get() if ( !( xProps.get()
...@@ -1382,6 +1379,14 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( ...@@ -1382,6 +1379,14 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
rProperties, rProperties,
aHeaderNames ); 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() ) if ( !aHeaderNames.empty() )
{ {
try try
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment