diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2021-07-20 08:16:28 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2021-07-21 10:37:06 +0200 |
commit | 95064c35826793c5d6a4edff9fa08ad308b047bb (patch) | |
tree | e5a04068d5eb191199845a300542d8909ef26452 /tests | |
parent | 030121601d12ecf35274fc1171fc141c61578bde (diff) |
H2: emit encrypted for at least the first reply, similar to H1
Fixes: QTBUG-95277
Change-Id: I1fe01503376c0d6278e366d7bd31b412b7cc3a69
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit c23b7886348dc313ccec1a131850a7cce1b429de)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/network/access/http2/tst_http2.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/network/access/http2/tst_http2.cpp b/tests/auto/network/access/http2/tst_http2.cpp index 0d851cd3df..392419e066 100644 --- a/tests/auto/network/access/http2/tst_http2.cpp +++ b/tests/auto/network/access/http2/tst_http2.cpp @@ -271,6 +271,10 @@ void tst_Http2::singleRequest() request.setAttribute(h2Attribute, QVariant(true)); auto reply = manager->get(request); +#if QT_CONFIG(ssl) + QSignalSpy encSpy(reply, &QNetworkReply::encrypted); +#endif // QT_CONFIG(ssl) + connect(reply, &QNetworkReply::finished, this, &tst_Http2::replyFinished); // Since we're using self-signed certificates, // ignore SSL errors: @@ -285,6 +289,11 @@ void tst_Http2::singleRequest() QCOMPARE(reply->error(), QNetworkReply::NoError); QVERIFY(reply->isFinished()); + +#if QT_CONFIG(ssl) + if (connectionType == H2Type::h2Alpn || connectionType == H2Type::h2Direct) + QCOMPARE(encSpy.count(), 1); +#endif // QT_CONFIG(ssl) } void tst_Http2::multipleRequests() |