[Pkg-owncloud-commits] [owncloud-client] 21/211: CheckServerJob: Require status code 200. #2290

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Oct 25 09:10:22 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit dfba8fbe5e932654bb604b8a1d1e33ea7d27f358
Author: Christian Kamm <kamm at incasoftware.de>
Date:   Thu Oct 9 11:05:04 2014 +0200

    CheckServerJob: Require status code 200. #2290
---
 src/mirall/networkjobs.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mirall/networkjobs.cpp b/src/mirall/networkjobs.cpp
index e92921e..dfa9587 100644
--- a/src/mirall/networkjobs.cpp
+++ b/src/mirall/networkjobs.cpp
@@ -430,7 +430,9 @@ bool CheckServerJob::finished()
 
     bool success = false;
     QByteArray body = reply()->readAll();
-    if( body.isEmpty() ) {
+    int httpStatus = reply()->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
+    if( body.isEmpty() || httpStatus != 200) {
+        qDebug() << "error: status.php replied " << httpStatus << body;
         emit instanceNotFound(reply());
     } else {
         QVariantMap status = QtJson::parse(QString::fromUtf8(body), success).toMap();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list