diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2018-05-30 17:29:29 +0300 |
---|---|---|
committer | Olivier Goffart <olivier@woboq.com> | 2018-06-01 14:21:22 +0300 |
commit | 13cb9ab1c5e645d1103254a8ef00273e87f67044 (patch) | |
tree | 42423abd04bf003b6895d9d78e1ce4fec3147457 /test/syncenginetestutils.h | |
parent | f5ac5f297377b0cef34749546639b517dfc4226f (diff) |
PropagateDownload: Don't discard the body of error message
We want to keep the body so we can get the message from it
(Issue #6459)
TestDownload::testErrorMessage did not fail because the FakeErrorReply
did not emit readyRead and did not implement bytesAvailable.
Diffstat (limited to 'test/syncenginetestutils.h')
-rw-r--r-- | test/syncenginetestutils.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/syncenginetestutils.h b/test/syncenginetestutils.h index 1a78add5b..3957479d6 100644 --- a/test/syncenginetestutils.h +++ b/test/syncenginetestutils.h @@ -728,6 +728,8 @@ public: setAttribute(QNetworkRequest::HttpStatusCodeAttribute, _httpErrorCode); setError(InternalServerError, "Internal Server Fake Error"); emit metaDataChanged(); + emit readyRead(); + setFinished(true); emit finished(); } @@ -738,6 +740,9 @@ public: _body = _body.mid(max); return max; } + qint64 bytesAvailable() const override { + return _body.size(); + } int _httpErrorCode; QByteArray _body; |