diff ui/downloader.cpp @ 553:cb044efdaf0d

Debugging: Always log the complete response
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 22 May 2014 08:50:28 +0000
parents 5834b340c54c
children 13cf42dbe9bd
line wrap: on
line diff
--- a/ui/downloader.cpp	Wed May 21 08:40:13 2014 +0000
+++ b/ui/downloader.cpp	Thu May 22 08:50:28 2014 +0000
@@ -120,6 +120,8 @@
 
     response = mSSLConnection.read(1024);
 
+    qDebug() << "Response from server was: " << response;
+
     if (response.isNull()) {
         qDebug() << "No response";
         emit error (tr("Connection lost"), SSLConnection::ConnectionLost);
@@ -128,7 +130,6 @@
 
     headers = parseHeaders(&response);
     const QString lastModified = headers.value("Last-Modified");
-    qDebug() << "Headers: " << headers;
     if (!lastModified.isEmpty()) {
         QDateTime candidate = cLocale.toDateTime(lastModified,
                 "ddd, dd MMM yyyy HH:mm:ss' GMT'");
@@ -137,7 +138,6 @@
         }
     }
     emit error (tr("Invalid response from the server"), SSLConnection::InvalidResponse);
-    qDebug() << "Response from server was: " << response;
     return QDateTime();
 }
 

http://wald.intevation.org/projects/trustbridge/