summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/access/http2/http2srv.cpp
diff options
context:
space:
mode:
authorMårten Nordheim <morten242@gmail.com>2021-04-28 18:19:57 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2021-04-30 14:43:24 +0200
commitdeda40b8591a387e634ebfcf48287c14162ef332 (patch)
treef5a791fc717c548b518f97efd1b95e5781e0eff7 /tests/auto/network/access/http2/http2srv.cpp
parent000120d47c667254373441f5368861288df22423 (diff)
Let the h2 test server both send and receive DATA frames
And use this in the authenticationRequired test. Pick-to: 6.1 6.0 5.15 Change-Id: I18e991eb67168214c2c4f829afaca5018568e989 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'tests/auto/network/access/http2/http2srv.cpp')
-rw-r--r--tests/auto/network/access/http2/http2srv.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/network/access/http2/http2srv.cpp b/tests/auto/network/access/http2/http2srv.cpp
index c2670ca2a5..932b11fbb6 100644
--- a/tests/auto/network/access/http2/http2srv.cpp
+++ b/tests/auto/network/access/http2/http2srv.cpp
@@ -753,8 +753,10 @@ void Http2Server::handleDATA()
}
if (inboundFrame.flags().testFlag(FrameFlag::END_STREAM)) {
- closedStreams.insert(streamID); // Enter "half-closed remote" state.
- streamWindows.erase(it);
+ if (responseBody.isEmpty()) {
+ closedStreams.insert(streamID); // Enter "half-closed remote" state.
+ streamWindows.erase(it);
+ }
emit receivedData(streamID);
}
emit receivedDATAFrame(streamID,