diff options
author | Liang Qi <liang.qi@qt.io> | 2019-05-07 11:44:37 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-05-07 11:58:30 +0200 |
commit | c2b553784dfbe0ece90f79709639e27e74359a7d (patch) | |
tree | 04b0c74c7417a5f1b628d0b18a07f9dd8be1df60 /src/network | |
parent | 0b373c2e36a68aedf3731fcb3cd84fd010c2d67c (diff) | |
parent | 8ea0a82a6a771dd76df2d51c6ef3ed966a5b9b45 (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
src/corelib/kernel/qobject.cpp
src/corelib/kernel/qvariant.h
src/corelib/tools/qlist.h
Done-With: Milian Wolff <milian.wolff@kdab.com>
Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io>
Change-Id: I6803f7239aa137a51a7467fab7cc7a01302a848d
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/access/qhttp2protocolhandler.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/network/access/qhttp2protocolhandler.cpp b/src/network/access/qhttp2protocolhandler.cpp index 35aee6e3e1..87a70d8a55 100644 --- a/src/network/access/qhttp2protocolhandler.cpp +++ b/src/network/access/qhttp2protocolhandler.cpp @@ -818,7 +818,6 @@ void QHttp2ProtocolHandler::handleGOAWAY() // and a NO_ERROR code." if (lastStreamID != Http2::lastValidStreamID || errorCode != HTTP2_NO_ERROR) return connectionError(PROTOCOL_ERROR, "GOAWAY invalid stream/error code"); - lastStreamID = 1; } else { lastStreamID += 2; } @@ -836,6 +835,14 @@ void QHttp2ProtocolHandler::handleGOAWAY() QString message; qt_error(errorCode, error, message); + // Even if the GOAWAY frame contains NO_ERROR we must send an error + // when terminating streams to ensure users can distinguish from a + // successful completion. + if (errorCode == HTTP2_NO_ERROR) { + error = QNetworkReply::ContentReSendError; + message = QLatin1String("Server stopped accepting new streams before this stream was established"); + } + for (quint32 id = lastStreamID; id < nextID; id += 2) { const auto it = activeStreams.find(id); if (it != activeStreams.end()) { |