diff options
author | Liang Qi <liang.qi@qt.io> | 2019-05-03 10:44:24 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-05-03 10:44:24 +0200 |
commit | b5c2535eb0da4ad2b65e79df288a3674f3118717 (patch) | |
tree | 964bd1dfaa9c769878f8195db6d2bce03ef4e5c7 /src/network/access | |
parent | 3f25bcd5b7ec0d8a17a3a236099b9049b32b7755 (diff) | |
parent | 6c0ced4b7a77b089b434ab5eb9f430717f26d687 (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
src/3rdparty/pcre2/qt_attribution.json
Change-Id: Ibae941cb12662f27bd6962ee02bc235971c59a15
Diffstat (limited to 'src/network/access')
-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()) { |