diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-02-21 01:00:08 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-02-21 01:00:08 +0100 |
commit | 0c0c4a23bc55619c59d2cd0ccd4d4b19bb1fea59 (patch) | |
tree | 0e56c0e3a3acb05232949b6a5d3e18feb48eb25e /tests/auto/network/access/http2/http2srv.cpp | |
parent | a4b8e7141b3dd3bf3c2ac139b44ece0f74b054d8 (diff) | |
parent | 904617dfb83f39a6a379635b64fea6fcd00f241a (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I830beea26863323ab78a5d4b093f7763d77ad3da
Diffstat (limited to 'tests/auto/network/access/http2/http2srv.cpp')
-rw-r--r-- | tests/auto/network/access/http2/http2srv.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/network/access/http2/http2srv.cpp b/tests/auto/network/access/http2/http2srv.cpp index 1f9ffb8985..6e2220fa67 100644 --- a/tests/auto/network/access/http2/http2srv.cpp +++ b/tests/auto/network/access/http2/http2srv.cpp @@ -431,6 +431,13 @@ void Http2Server::readReady() if (connectionError) return; + if (redirectSent) { + // We are a "single shot" server, working in 'h2' mode, + // responding with a redirect code. Don't bother to handle + // anything else now. + return; + } + if (upgradeProtocol) { handleProtocolUpgrade(); } else if (waitingClientPreface) { @@ -800,6 +807,13 @@ void Http2Server::sendResponse(quint32 streamID, bool emptyBody) HttpHeader header; if (redirectWhileReading) { + if (redirectSent) { + // This is a "single-shot" server responding with a redirect code. + return; + } + + redirectSent = true; + qDebug("server received HEADERS frame (followed by DATA frames), redirecting ..."); Q_ASSERT(targetPort); header.push_back({":status", "308"}); |