Navigation Menu

Skip to content

Commit

Permalink
Urlencode non ascii chars in User-Agent
Browse files Browse the repository at this point in the history
backport from master b490f86.
  • Loading branch information
elpaso committed Dec 14, 2019
1 parent a783bd2 commit 578cfc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/qgsnetworkaccessmanager.cpp
Expand Up @@ -221,8 +221,8 @@ QNetworkReply *QgsNetworkAccessManager::createRequest( QNetworkAccessManager::Op
QString userAgent = s.value( QStringLiteral( "/qgis/networkAndProxy/userAgent" ), "Mozilla/5.0" ).toString();
if ( !userAgent.isEmpty() )
userAgent += ' ';
userAgent += QStringLiteral( "QGIS/%1" ).arg( Qgis::QGIS_VERSION );
pReq->setRawHeader( "User-Agent", userAgent.toUtf8() );
userAgent += QStringLiteral( "QGIS/%1" ).arg( Qgis::QGIS_VERSION_INT );
pReq->setRawHeader( "User-Agent", userAgent.toLatin1() );

#ifndef QT_NO_SSL
bool ishttps = pReq->url().scheme().compare( QLatin1String( "https" ), Qt::CaseInsensitive ) == 0;
Expand Down

0 comments on commit 578cfc4

Please sign in to comment.