From 165b1c7da1be92e954078b55674e90d8a46137cb Mon Sep 17 00:00:00 2001 From: Jeongmin Kim Date: Tue, 2 Dec 2014 12:53:19 +0900 Subject: QHttpThreadDelegate : Fix QHttpThreadDelegate don't read response data about Synchronous error reply. The App might use response data of Synchronous 401 reply. (example : specific error info of code, string as json) so, Added a function to read it for Sync. Async is already OK. Sync path is different from Async path. Change-Id: I683d4b6b40f600793d2545811dcd6644515de79c Task-number:QTBUG-43030 Reviewed-by: Jeongmin Kim Reviewed-by: Frederik Gladhorn Reviewed-by: Richard J. Moore --- src/network/access/qhttpthreaddelegate.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/network') diff --git a/src/network/access/qhttpthreaddelegate.cpp b/src/network/access/qhttpthreaddelegate.cpp index 4e1d24280b..06d62fbbcb 100644 --- a/src/network/access/qhttpthreaddelegate.cpp +++ b/src/network/access/qhttpthreaddelegate.cpp @@ -548,6 +548,8 @@ void QHttpThreadDelegate::synchronousFinishedWithErrorSlot(QNetworkReply::Networ incomingErrorCode = errorCode; incomingErrorDetail = detail; + synchronousDownloadData = httpReply->readAll(); + QMetaObject::invokeMethod(httpReply, "deleteLater", Qt::QueuedConnection); QMetaObject::invokeMethod(synchronousRequestLoop, "quit", Qt::QueuedConnection); httpReply = 0; -- cgit v1.2.3