QHttp2Connection: Send error for CONTINUATION without preceding data
Send connection error type PROTOCOL_ERROR when receivng CONTINUATION frames without any data received from previous HEADERS or PUSH_PROMISE frames, instead of assert. Task-number: QTBUG-122375 Change-Id: Ib14e4610692dc4832b1f3e99dca497d9baf3d9d3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 89467428f8173524083fd7d2cca9c2985141d567) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
bf7eff0188
commit
fbdcae954e
@ -1204,7 +1204,9 @@ void QHttp2Connection::handleWINDOW_UPDATE()
|
||||
void QHttp2Connection::handleCONTINUATION()
|
||||
{
|
||||
Q_ASSERT(inboundFrame.type() == FrameType::CONTINUATION);
|
||||
Q_ASSERT(!continuedFrames.empty()); // HEADERS frame must be already in.
|
||||
if (continuedFrames.empty())
|
||||
return connectionError(PROTOCOL_ERROR,
|
||||
"CONTINUATION without a preceding HEADERS or PUSH_PROMISE");
|
||||
|
||||
if (inboundFrame.streamID() != continuedFrames.front().streamID())
|
||||
return connectionError(PROTOCOL_ERROR, "CONTINUATION on invalid stream");
|
||||
|
Loading…
x
Reference in New Issue
Block a user