HTTP/2 - do not set END_HEADERS if we have CONTINUATIONs
Setting END_HEADERS flag on a HEADERS frame means we do not have CONTINUATION frame(s). So do NOT set it too early, only if we fit into a single frame. Change-Id: I891a2db227cee59e4eacfe7c2f18b431cd85fe47 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
02a03e52f7
commit
3c5b9977cd
@ -478,6 +478,7 @@ bool FrameWriter::writeHEADERS(QAbstractSocket &socket, quint32 sizeLimit)
|
||||
sizeLimit = quint32(maxPayloadSize);
|
||||
|
||||
if (quint32(frameBuffer.size() - frameHeaderSize) <= sizeLimit) {
|
||||
addFlag(FrameFlag::END_HEADERS);
|
||||
updatePayloadSize();
|
||||
return write(socket);
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ bool QHttp2ProtocolHandler::sendHEADERS(Stream &stream)
|
||||
{
|
||||
using namespace HPack;
|
||||
|
||||
outboundFrame.start(FrameType::HEADERS, FrameFlag::PRIORITY | FrameFlag::END_HEADERS,
|
||||
outboundFrame.start(FrameType::HEADERS, FrameFlag::PRIORITY,
|
||||
stream.streamID);
|
||||
|
||||
if (!stream.data()) {
|
||||
|
Loading…
Reference in New Issue
Block a user