diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-11-20 17:28:14 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-25 17:18:51 +0100 |
commit | 3d1f850237d96280f4f820897c186845698bd17d (patch) | |
tree | 6c101f95c92f1608be3e284a340cf3d7abfd493e /tests/auto/shared/testhttpserver.h | |
parent | 0bdb509e29a648d5920bc14c444619b1990ccc63 (diff) |
Tests: Enable TestHTTPServer to receive data in chunks.
Fixes tst_qqmlxmlhttprequest on Windows.
Task-number: QTQAINFRA-573
Change-Id: Ie685cfa90904672246c1c5d8d3cec54c63cc76ba
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Diffstat (limited to 'tests/auto/shared/testhttpserver.h')
-rw-r--r-- | tests/auto/shared/testhttpserver.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/shared/testhttpserver.h b/tests/auto/shared/testhttpserver.h index ce0501f170..ae7d137143 100644 --- a/tests/auto/shared/testhttpserver.h +++ b/tests/auto/shared/testhttpserver.h @@ -74,6 +74,12 @@ private slots: void sendOne(); private: + enum State { + AwaitingHeader, + AwaitingData, + Failed + }; + void serveGET(QTcpSocket *, const QByteArray &); bool reply(QTcpSocket *, const QByteArray &); @@ -87,7 +93,8 @@ private: } waitData; QByteArray replyData; QByteArray bodyData; - bool m_hasFailed; + QByteArray m_data; + State m_state; QHash<QString,QString> aliases; QHash<QString,QString> redirects; |