diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-08-27 11:26:18 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-08-27 11:26:18 +0200 |
commit | d3de490437df4c9093f32e97fc185066d64c0f46 (patch) | |
tree | 4007a7f4490ec76a8ced555e85cc9938ada79f4c /ucb/source/ucp/webdav/webdavprovider.cxx | |
parent | 9c3f5324bf155b11dad2036a3556c8afafdb89a9 (diff) |
Add vnd.sun.star.webdavs URL scheme
...as https-equivalent to complement vnd.sun.star.webdav scheme. See the mail
thread starting at
<http://lists.freedesktop.org/archives/libreoffice/2015-August/069929.html>
"What autogen.sh for an alternative ContentProvider for dav:// scheme?" for why
it is considered beneficial to have the WebDAV UCP support---in addition to the
standard pair of http[s] schemes---a non-standard pair of
vnd.sun.star.webdav[s] schemes different from the "accidentally supported"
non-standard pair of dav[s].
Change-Id: I7032aa1ed599f735969cf0163cd9dc121a1fdcb3
Diffstat (limited to 'ucb/source/ucp/webdav/webdavprovider.cxx')
-rw-r--r-- | ucb/source/ucp/webdav/webdavprovider.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx index e485d0e40cca..9d1a71ba6321 100644 --- a/ucb/source/ucp/webdav/webdavprovider.cxx +++ b/ucb/source/ucp/webdav/webdavprovider.cxx @@ -123,8 +123,8 @@ ContentProvider::queryContent( const OUString aScheme = Identifier->getContentProviderScheme().toAsciiLowerCase(); if ( aScheme != HTTP_URL_SCHEME && aScheme != HTTPS_URL_SCHEME && - aScheme != WEBDAV_URL_SCHEME && aScheme != DAV_URL_SCHEME && - aScheme != DAVS_URL_SCHEME ) + aScheme != WEBDAV_URL_SCHEME && aScheme != WEBDAVS_URL_SCHEME && + aScheme != DAV_URL_SCHEME && aScheme != DAVS_URL_SCHEME ) throw ucb::IllegalIdentifierException(); // Normalize URL and create new Id, if nessacary. @@ -147,6 +147,13 @@ ContentProvider::queryContent( OUString( HTTP_URL_SCHEME ) ); bNewId = true; } + else if ( aScheme == WEBDAVS_URL_SCHEME ) + { + aURL = aURL.replaceAt( 0, + WEBDAVS_URL_SCHEME_LENGTH, + OUString( HTTPS_URL_SCHEME ) ); + bNewId = true; + } else if ( aScheme == DAV_URL_SCHEME ) { aURL = aURL.replaceAt( 0, |