summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAleix Pol <aleixpol@kde.org>2015-04-20 02:54:01 +0200
committerAleix Pol Gonzalez <aleixpol@kde.org>2015-04-21 11:09:33 +0000
commit9286a8e5dd97c5d4d7e0ed07a73d4ce7240fdc1d (patch)
treef10be9fb79e8a8233ba134592902d8d5a157b515 /src
parent84ad1294401bbbeddee33427c76df41715cc9f5a (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/network/access/qnetworkaccessbackend.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/access/qnetworkaccessbackend.cpp b/src/network/access/qnetworkaccessbackend.cpp
index 183afadf17..692af1b2fc 100644
--- a/src/network/access/qnetworkaccessbackend.cpp
+++ b/src/network/access/qnetworkaccessbackend.cpp
@@ -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