[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - ucb/source

Luboš Luňák (via logerrit) logerrit at kemper.freedesktop.org
Fri Apr 23 06:15:42 UTC 2021


 ucb/source/ucp/webdav/SerfUri.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit b345c5b489a8b270dfa767d2bb773232540a7fe6
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Thu Apr 22 22:07:48 2021 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Apr 23 08:15:09 2021 +0200

    handle properly missing URI components for webdav/serf
    
    Username is not mandatory for http://, and files require only path.
    
    Change-Id: Iab4e81692b288d17dd8a35954e34a1bbe7c943ef
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114526
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
    (cherry picked from commit 8313e7fe55d4ad147df0b5b1f9f94c6882197132)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114503
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/ucb/source/ucp/webdav/SerfUri.cxx b/ucb/source/ucp/webdav/SerfUri.cxx
index dab11a64cfa9..ac87848c0878 100644
--- a/ucb/source/ucp/webdav/SerfUri.cxx
+++ b/ucb/source/ucp/webdav/SerfUri.cxx
@@ -90,9 +90,9 @@ SerfUri::SerfUri( const OUString & inUri )
 
 void SerfUri::init( const apr_uri_t * pUri )
 {
-    mScheme   = OStringToOUString( pUri->scheme, RTL_TEXTENCODING_UTF8 );
-    mUserInfo = OStringToOUString( pUri->user, RTL_TEXTENCODING_UTF8 );
-    mHostName = OStringToOUString( pUri->hostname, RTL_TEXTENCODING_UTF8 );
+    mScheme   = pUri->scheme ? OStringToOUString( pUri->scheme, RTL_TEXTENCODING_UTF8 ) : "";
+    mUserInfo = pUri->user ? OStringToOUString( pUri->user, RTL_TEXTENCODING_UTF8 ) : "";
+    mHostName = pUri->hostname ? OStringToOUString( pUri->hostname, RTL_TEXTENCODING_UTF8 ) : "";
     mPort     = pUri->port;
     mPath     = OStringToOUString( pUri->path, RTL_TEXTENCODING_UTF8 );
 


More information about the Libreoffice-commits mailing list