From 2e76fe87c2f3cb8ee8591de715942bdb171392f6 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 2 May 2014 17:25:13 +0200 Subject: [PATCH] Fix reporting the right error in a GET We always reported the lack of e-tag instead of the real error --- src/mirall/propagator_qnam.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mirall/propagator_qnam.cpp b/src/mirall/propagator_qnam.cpp index 2992061f54..08a2e4fefc 100644 --- a/src/mirall/propagator_qnam.cpp +++ b/src/mirall/propagator_qnam.cpp @@ -377,8 +377,8 @@ void GETFileJob::start() { void GETFileJob::slotMetaDataChanged() { - qDebug() << Q_FUNC_INFO << reply()->error() << reply()->errorString() << reply()->attribute(QNetworkRequest::HttpStatusCodeAttribute); - if (reply()->error() != QNetworkReply::NoError ) { + if (reply()->error() != QNetworkReply::NoError + || reply()->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt() / 100 != 2) { // We will handle the error when the job is finished. return; }