[Libreoffice-commits] core.git: ucb/source
LuboÅ¡ LuÅák (via logerrit)
logerrit at kemper.freedesktop.org
Thu Apr 22 21:46:50 UTC 2021
ucb/source/ucp/webdav/SerfUri.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 8313e7fe55d4ad147df0b5b1f9f94c6882197132
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Thu Apr 22 22:07:48 2021 +0200
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Thu Apr 22 23:46: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>
diff --git a/ucb/source/ucp/webdav/SerfUri.cxx b/ucb/source/ucp/webdav/SerfUri.cxx
index 8852779faeba..c48b4f254b72 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