Understand file:/ url's as local
When making a QNetworkAccessManager query, don't require a network session in case of file:/ queries, like we do when "localhost" is the hostname or a loopback device. Change-Id: I4faab7cf356ee53e6e13ab55b152365680af9446 Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Richard J. Moore <rich@kde.org>
This commit is contained in:
parent
84ad129440
commit
9286a8e5dd
@ -383,7 +383,8 @@ bool QNetworkAccessBackend::start()
|
||||
const QString host = reply->url.host();
|
||||
|
||||
if (host == QLatin1String("localhost") ||
|
||||
QHostAddress(host).isLoopback()) {
|
||||
QHostAddress(host).isLoopback() ||
|
||||
reply->url.isLocalFile()) {
|
||||
// Don't need an open session for localhost access.
|
||||
} else {
|
||||
// need to wait for session to be opened
|
||||
|
Loading…
Reference in New Issue
Block a user