Skip to content
Permalink
Browse files

Skip proxy auth settings if proxy is disabled

This does not really change anything but it makes more sense
  • Loading branch information
elpaso committed Nov 10, 2017
1 parent d8fc6e8 commit e85897c3542b63c12dcaf0272992b9a7f27e35af
Showing with 10 additions and 11 deletions.
  1. +10 −11 src/core/qgsnetworkaccessmanager.cpp
@@ -66,7 +66,7 @@ class QgsNetworkProxyFactory : public QNetworkProxyFactory
return proxies;
}

// no proxies from the proxy factor list check for excludes
// no proxies from the proxy factory list check for excludes
if ( query.queryType() != QNetworkProxyQuery::UrlRequest )
return QList<QNetworkProxy>() << nam->fallbackProxy();

@@ -364,16 +364,15 @@ void QgsNetworkAccessManager::setupDefaultProxyAndCache()
);
proxy = QNetworkProxy( proxyType, proxyHost, proxyPort, proxyUser, proxyPassword );
}
}

// Setup network proxy authentication configuration
QString authcfg = settings.value( QStringLiteral( "proxy/authcfg" ), "" ).toString();
if ( !authcfg.isEmpty( ) )
{
QgsDebugMsg( QStringLiteral( "setting proxy from stored authentication configuration %1" ).arg( authcfg ) );
// Never crash! Never.
if ( QgsApplication::authManager() )
QgsApplication::authManager()->updateNetworkProxy( proxy, authcfg );
// Setup network proxy authentication configuration
QString authcfg = settings.value( QStringLiteral( "proxy/authcfg" ), "" ).toString();
if ( !authcfg.isEmpty( ) )
{
QgsDebugMsg( QStringLiteral( "setting proxy from stored authentication configuration %1" ).arg( authcfg ) );
// Never crash! Never.
if ( QgsApplication::authManager() )
QgsApplication::authManager()->updateNetworkProxy( proxy, authcfg );
}
}

setFallbackProxyAndExcludes( proxy, excludes );

0 comments on commit e85897c

Please sign in to comment.
You can’t perform that action at this time.