Kaydet (Commit) 5c4de8f1 authored tarafından Giuseppe Castagno's avatar Giuseppe Castagno Kaydeden (comit) Stephan Bergmann

Related tdf#96833: breadcrumb: setting URL, host port gets lost.

At the same time added a log in WebDAV, useful to discover the
issue.

Change-Id: I3435f8d3da28f7d6b4c2e154cf2bb5ee33a9a690
Reviewed-on: https://gerrit.libreoffice.org/21047Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 95c125f0
...@@ -105,13 +105,22 @@ void Breadcrumb::SetURL( const OUString& rURL ) ...@@ -105,13 +105,22 @@ void Breadcrumb::SetURL( const OUString& rURL )
m_aCurrentURL = rURL; m_aCurrentURL = rURL;
INetURLObject aURL( rURL ); INetURLObject aURL( rURL );
aURL.setFinalSlash(); aURL.setFinalSlash();
//prepare the Host port
OUString sHostPort;
if( aURL.HasPort() )
{
sHostPort += ":";
sHostPort += sHostPort.number( aURL.GetPort() );
}
OUString sUser = aURL.GetUser( INetURLObject::NO_DECODE ); OUString sUser = aURL.GetUser( INetURLObject::NO_DECODE );
OUString sPath = aURL.GetURLPath(INetURLObject::DECODE_WITH_CHARSET); OUString sPath = aURL.GetURLPath(INetURLObject::DECODE_WITH_CHARSET);
OUString sRootPath = INetURLObject::GetScheme( aURL.GetProtocol() ) OUString sRootPath = INetURLObject::GetScheme( aURL.GetProtocol() )
+ sUser + sUser
+ ( sUser.isEmpty() ? OUString() : "@" ) + ( sUser.isEmpty() ? OUString() : "@" )
+ aURL.GetHost(); + aURL.GetHost()
+ sHostPort;
int nSegments = aURL.getSegmentCount(); int nSegments = aURL.getSegmentCount();
unsigned int nPos = 0; unsigned int nPos = 0;
......
...@@ -1746,6 +1746,7 @@ void NeonSession::HandleError( int nError, ...@@ -1746,6 +1746,7 @@ void NeonSession::HandleError( int nError,
m_aProxyName, m_nProxyPort ) ); m_aProxyName, m_nProxyPort ) );
case NE_CONNECT: // Could not connect to server case NE_CONNECT: // Could not connect to server
SAL_WARN( "ucb.ucp.webdav", "DAVException::DAV_HTTP_CONNECT" );
throw DAVException( DAVException::DAV_HTTP_CONNECT, throw DAVException( DAVException::DAV_HTTP_CONNECT,
NeonUri::makeConnectionEndPointString( NeonUri::makeConnectionEndPointString(
m_aHostName, m_nPort ) ); m_aHostName, m_nPort ) );
......
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