diff options
| author | Mårten Nordheim <marten.nordheim@qt.io> | 2025-06-05 12:12:56 +0200 |
|---|---|---|
| committer | Mårten Nordheim <marten.nordheim@qt.io> | 2025-06-10 17:09:25 +0200 |
| commit | 904aec2f372e2981af19bf762583a0ef42ec6bb9 (patch) | |
| tree | 0f1c30376efe255295a35d05ee93d59cd5d589ad /src/network/access/qhttp2protocolhandler.cpp | |
| parent | 97fe141f25655d2debd9f3f9ca278aaa759f15e0 (diff) | |
Http2: Explicitly send RST_STREAM on cancelled request
It will do this when it gets deleted, but due to deleteLater just adding
an event to the event queue the events that are ahead in the queue may
use the stream in question. This would lead to a variant of
'stream not found', or specifically in the case of the bugreport, a
'HEADERS on non-existent stream' stream error.
Amends 6b4e11e63ead46dde5c1002c123ca964bb6aa342
Fixes: QTBUG-137427
Pick-to: 6.10 6.9
Change-Id: I5f2b2d5660866f1ad12aaafbb4e572b08ed5a6e4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/network/access/qhttp2protocolhandler.cpp')
| -rw-r--r-- | src/network/access/qhttp2protocolhandler.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/network/access/qhttp2protocolhandler.cpp b/src/network/access/qhttp2protocolhandler.cpp index a99921f5288..6a1e5d69230 100644 --- a/src/network/access/qhttp2protocolhandler.cpp +++ b/src/network/access/qhttp2protocolhandler.cpp @@ -265,6 +265,7 @@ bool QHttp2ProtocolHandler::tryRemoveReply(QHttpNetworkReply *reply) { QHttp2Stream *stream = streamIDs.take(reply); if (stream) { + stream->sendRST_STREAM(stream->isUploadingDATA() ? Http2::CANCEL : Http2::HTTP2_NO_ERROR); requestReplyPairs.remove(stream); stream->deleteLater(); return true; |
