diff options
Diffstat (limited to 'rbutil/rbutilqt/base')
-rw-r--r-- | rbutil/rbutilqt/base/httpget.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rbutil/rbutilqt/base/httpget.cpp b/rbutil/rbutilqt/base/httpget.cpp index 4b08faf33b..4d10301bc0 100644 --- a/rbutil/rbutilqt/base/httpget.cpp +++ b/rbutil/rbutilqt/base/httpget.cpp | |||
@@ -17,7 +17,6 @@ | |||
17 | ****************************************************************************/ | 17 | ****************************************************************************/ |
18 | 18 | ||
19 | #include <QtNetwork> | 19 | #include <QtNetwork> |
20 | #include <QtDebug> | ||
21 | 20 | ||
22 | #include <QNetworkAccessManager> | 21 | #include <QNetworkAccessManager> |
23 | #include <QNetworkRequest> | 22 | #include <QNetworkRequest> |
@@ -155,7 +154,10 @@ void HttpGet::requestFinished(QNetworkReply* reply) | |||
155 | startRequest(url); | 154 | startRequest(url); |
156 | return; | 155 | return; |
157 | } | 156 | } |
158 | else if(m_lastStatusCode == 200) { | 157 | else if(m_lastStatusCode == 200 || |
158 | (reply->url().isLocalFile() && reply->error() == 0)) { | ||
159 | // callers might not be aware if the request is file:// so fake 200. | ||
160 | m_lastStatusCode = 200; | ||
159 | m_data = reply->readAll(); | 161 | m_data = reply->readAll(); |
160 | if(m_outputFile && m_outputFile->open(QIODevice::WriteOnly)) { | 162 | if(m_outputFile && m_outputFile->open(QIODevice::WriteOnly)) { |
161 | m_outputFile->write(m_data); | 163 | m_outputFile->write(m_data); |