diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2019-08-08 16:12:46 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2019-08-20 07:19:43 +0200 |
commit | 8052755fd7581d70802f651d88b7af8447432d75 (patch) | |
tree | 078faf26de1608c7b2cdf1f1b36807d8f3f9f63b /tests/auto/network/access/http2/http2srv.h | |
parent | dcdfb6908db0f83cbc4e550859f56ee58a6b3420 (diff) |
Add means to configure HTTP/2 protocol handler
Similar to TLS configuration that we can use on QNetworkRequest,
we can configure different options in our HTTP/2 handling by
providing QNetworkAccessManager with h2 configuration. Previously,
it was only possible internally in our auto-test - a hack with
QObject's properties and a private class. Now it's time to provide
a public API for this.
[ChangeLog][QtNetwork][QNetworkRequest] Add an ability to configure HTTP/2 protocol
Change-Id: I80266a74f6dcdfabb7fc05ed1dce17897bcda886
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'tests/auto/network/access/http2/http2srv.h')
-rw-r--r-- | tests/auto/network/access/http2/http2srv.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/auto/network/access/http2/http2srv.h b/tests/auto/network/access/http2/http2srv.h index 4ef4b25101..9cb846b0b3 100644 --- a/tests/auto/network/access/http2/http2srv.h +++ b/tests/auto/network/access/http2/http2srv.h @@ -42,6 +42,7 @@ #include <QtCore/qbytearray.h> #include <QtCore/qatomic.h> #include <QtCore/qglobal.h> +#include <QtCore/qmap.h> #include <vector> #include <map> @@ -69,13 +70,15 @@ enum class H2Type { h2cDirect, // Clear text direct }; +using RawSettings = QMap<Http2::Settings, quint32>; + class Http2Server : public QTcpServer { Q_OBJECT public: - Http2Server(H2Type type, const Http2::RawSettings &serverSettings, - const Http2::RawSettings &clientSettings); + Http2Server(H2Type type, const RawSettings &serverSettings, + const RawSettings &clientSettings); ~Http2Server(); @@ -147,8 +150,8 @@ private: bool settingsSent = false; bool waitingClientAck = false; - Http2::RawSettings serverSettings; - Http2::RawSettings expectedClientSettings; + RawSettings serverSettings; + RawSettings expectedClientSettings; bool connectionError = false; |