summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorKai Sommerfeld <kso@openoffice.org>2001-11-21 14:01:58 +0000
committerKai Sommerfeld <kso@openoffice.org>2001-11-21 14:01:58 +0000
commit2d380f37e755c89008c950b015fa48838d1904b9 (patch)
tree5dd0a6705f33cd4f416047f796101613fa63429b /ucb
parent2ab6c5e0b9bf8851fddd5fcfefc56f4c672d7d12 (diff)
#94819# - Fixed handling of vnd.sun.star.webdav URLs.
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/webdav/NeonUri.cxx13
-rw-r--r--ucb/source/ucp/webdav/webdavprovider.cxx22
2 files changed, 22 insertions, 13 deletions
diff --git a/ucb/source/ucp/webdav/NeonUri.cxx b/ucb/source/ucp/webdav/NeonUri.cxx
index ac77108fd837..ce3f7c94e184 100644
--- a/ucb/source/ucp/webdav/NeonUri.cxx
+++ b/ucb/source/ucp/webdav/NeonUri.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: NeonUri.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: sb $ $Date: 2001-08-08 10:04:35 $
+ * last change: $Author: kso $ $Date: 2001-11-21 15:01:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -106,18 +106,15 @@ NeonUri::NeonUri( const rtl::OUString & inUri )
rtl::OString theInputUri(
inUri.getStr(), inUri.getLength(), RTL_TEXTENCODING_UTF8 );
- rtl::OString aProtocol
- = theInputUri.copy( 0, RTL_CONSTASCII_LENGTH( "https:" ) );
-
uri theUri;
uri* pUriDefs
= matchIgnoreAsciiCase(theInputUri,
- RTL_CONSTASCII_STRINGPARAM("http:")) ?
- &sUriDefaultsHTTP :
+ RTL_CONSTASCII_STRINGPARAM("ftp:")) ?
+ &sUriDefaultsFTP :
matchIgnoreAsciiCase(theInputUri,
RTL_CONSTASCII_STRINGPARAM("https:")) ?
&sUriDefaultsHTTPS :
- &sUriDefaultsFTP;
+ &sUriDefaultsHTTP;
if ( uri_parse( theInputUri.getStr(), &theUri, pUriDefs ) != 0 )
{
diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx
index e3313a28c51e..e37b8329973e 100644
--- a/ucb/source/ucp/webdav/webdavprovider.cxx
+++ b/ucb/source/ucp/webdav/webdavprovider.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: webdavprovider.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: sb $ $Date: 2001-08-08 10:04:35 $
+ * last change: $Author: kso $ $Date: 2001-11-21 15:01:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -193,6 +193,17 @@ ContentProvider::queryContent(
uno::Reference< com::sun::star::ucb::XContentIdentifier > xCanonicId;
+ bool bNewId = false;
+ if ( aScheme.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM( WEBDAV_URL_SCHEME ) ) )
+ {
+ aURL = aURL.replaceAt( 0,
+ WEBDAV_URL_SCHEME_LENGTH,
+ rtl::OUString::createFromAscii(
+ HTTP_URL_SCHEME ) );
+ bNewId = true;
+ }
+
sal_Int32 nPos = aURL.lastIndexOf( '/' );
if ( nPos != aURL.getLength() - 1 )
{
@@ -205,11 +216,12 @@ ContentProvider::queryContent(
if ( nPos == -1 )
{
aURL += rtl::OUString::createFromAscii( "/" );
- xCanonicId = new ::ucb::ContentIdentifier( m_xSMgr, aURL );
+ bNewId = true;
}
- else
- xCanonicId = Identifier;
}
+
+ if ( bNewId )
+ xCanonicId = new ::ucb::ContentIdentifier( m_xSMgr, aURL );
else
xCanonicId = Identifier;