diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2016-12-13 16:26:06 +0100 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2017-01-11 10:39:43 +0000 |
commit | 1636f3bc9294cb3f3612bcc02bd3be305fb3f707 (patch) | |
tree | 20592ba3ab05cbd30f9582edbb7c6c09958ddc01 /tests/auto/network/access/http2/http2srv.h | |
parent | 6f504a1cdd1c076365e7916f0851c5d35a8f7ad1 (diff) |
HTTP/2 - fix handling of GOAWAY frame
- Fix the case when we erroneously handled stream ID == 0 in a GOAWAY frame as
an invalid stream ID.
- _q_receivedReply: convert do{}while() loop into to while(){} to prevent
it from handling any frames after GOAWAY frame received and all active frame
finished.
- sendRequest - if we received GOAWAY, also clear spdyRequests in the connection
channel, otherwise it keeps re-trying to send requests!
- Http network connection channel never resets a protocolHandler in _q_encrypted/
_q_connected, which is BAD for HTTP/2, since HTTP/2 has unique per-connection
compression context and must be reset - now we recreate the protocol handler in
_q_encrypted or _q_connected (https/http).
- Update autotest.
Task-number: QTBUG-57600
Change-Id: Ib864ce52287bab23334ff43a83ba4b0b7cb52c60
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/auto/network/access/http2/http2srv.h')
-rw-r--r-- | tests/auto/network/access/http2/http2srv.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/network/access/http2/http2srv.h b/tests/auto/network/access/http2/http2srv.h index 15a4f212c9..63a4a4c8e9 100644 --- a/tests/auto/network/access/http2/http2srv.h +++ b/tests/auto/network/access/http2/http2srv.h @@ -70,6 +70,7 @@ public: // To be called before server started: void enablePushPromise(bool enabled, const QByteArray &path = QByteArray()); void setResponseBody(const QByteArray &body); + void emulateGOAWAY(int timeout); // Invokables, since we can call them from the main thread, // but server (can) work on its own thread. @@ -162,6 +163,9 @@ private: quint32 lastPromisedStream = 0; QByteArray pushPath; + bool testingGOAWAY = false; + int goawayTimeout = 0; + protected slots: void ignoreErrorSlot(); }; |