diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2017-10-18 11:59:21 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2017-10-26 04:13:40 +0000 |
commit | 76a6b3294223f52568cd8c6190edceedbdca70ce (patch) | |
tree | 4455b5b12b72c27238272903c47cf4da275e8dd7 /tests/auto/network/access/http2/http2srv.h | |
parent | f174d31667dca184439f520b9624a1471d9556a6 (diff) |
HTTP/2 - make protocol settings configurablev5.10.0-beta3
1. Recently we have updated our receive window size to a larger value.
Unfortunately, this also results in auto-test pumping through
more data, which probably takes more time on CI.
At the moment we do not have any public API on QNAM's level to
customize HTTP/2 parameters (aka 5.10/FF and so on). So we use the fact
that QNAM is QObject and we can set a property on it. This property
is our Http2::ProtocolParameters object that allows us to configure:
- HPACK parameters (in 5.10 - noop)
- session receive window size
- different SETTINGS as described by RFC 7540, 6.5.2.
2. Undocumented environment variable to set ENABLE_PUSH is not needed
anymore.
3. In 5.11 Http2::ProtocolParameter will become a public API
and we'll introduce a new setter in QNAM.
Change-Id: If08fd5e09e7c0b61cf9700b426b60b5837b6b2e6
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
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 | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/tests/auto/network/access/http2/http2srv.h b/tests/auto/network/access/http2/http2srv.h index 10d0e86736..ff4a1319e2 100644 --- a/tests/auto/network/access/http2/http2srv.h +++ b/tests/auto/network/access/http2/http2srv.h @@ -48,19 +48,6 @@ QT_BEGIN_NAMESPACE -struct Http2Setting -{ - Http2::Settings identifier; - quint32 value = 0; - - Http2Setting(Http2::Settings ident, quint32 v) - : identifier(ident), - value(v) - {} -}; - -using Http2Settings = std::vector<Http2Setting>; - // At the moment we do not have any public API parsing HTTP headers. Even worse - // the code that can do this exists only in QHttpNetworkReplyPrivate class. // To be able to access reply's d_func() we have these classes: @@ -78,8 +65,8 @@ class Http2Server : public QTcpServer { Q_OBJECT public: - Http2Server(bool clearText, const Http2Settings &serverSettings, - const Http2Settings &clientSettings); + Http2Server(bool clearText, const Http2::RawSettings &serverSettings, + const Http2::RawSettings &clientSettings); ~Http2Server(); @@ -144,8 +131,8 @@ private: bool settingsSent = false; bool waitingClientAck = false; - Http2Settings serverSettings; - std::map<quint16, quint32> expectedClientSettings; + Http2::RawSettings serverSettings; + Http2::RawSettings expectedClientSettings; bool connectionError = false; |