Skip to content
Permalink
Browse files

Fix wms autorization logic

  • Loading branch information
elpaso committed Mar 25, 2021
1 parent 1ba3c26 commit 8379adb931319c2b6b3b37ebbd995326b64dfcd8
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/core/qgsdatasourceuri.cpp
  2. +1 −1 src/providers/wms/qgswmscapabilities.h
@@ -635,7 +635,7 @@ void QgsDataSourceUri::setEncodedUri( const QByteArray &uri )
mAuthConfigId.clear();

QUrl url;
url.setQuery( QString::fromUtf8( uri ) );
url.setQuery( QString::fromLatin1( uri ) );
const QUrlQuery query( url );

const auto constQueryItems = query.queryItems( QUrl::ComponentFormattingOption::FullyDecoded );
@@ -764,7 +764,7 @@ struct QgsWmsAuthorization
}
else if ( !mUserName.isEmpty() || !mPassword.isEmpty() )
{
request.setRawHeader( "Authorization", "Basic " + QStringLiteral( "%1:%2" ).arg( mUserName, mPassword ).toLatin1().toBase64() );
request.setRawHeader( "Authorization", "Basic " + QStringLiteral( "%1:%2" ).arg( mUserName, mPassword ).toUtf8().toBase64() );
}

if ( !mReferer.isEmpty() )

0 comments on commit 8379adb

Please sign in to comment.