summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/httpget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/base/httpget.cpp')
-rw-r--r--rbutil/rbutilqt/base/httpget.cpp6
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 @@
****************************************************************************/
#include <QtNetwork>
-#include <QtDebug>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
@@ -155,7 +154,10 @@ void HttpGet::requestFinished(QNetworkReply* reply)
startRequest(url);
return;
}
- else if(m_lastStatusCode == 200) {
+ else if(m_lastStatusCode == 200 ||
+ (reply->url().isLocalFile() && reply->error() == 0)) {
+ // callers might not be aware if the request is file:// so fake 200.
+ m_lastStatusCode = 200;
m_data = reply->readAll();
if(m_outputFile && m_outputFile->open(QIODevice::WriteOnly)) {
m_outputFile->write(m_data);