From 8d302aea33d54d7930fc700ab44a55e058d7bfcc Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Tue, 20 Aug 2019 12:09:42 +0200 Subject: HTTP/2: use a non-default MAX_FRAME_SIZE And send it in our 'SETTINGS' frame. Add an auto-test for this and (as a bonus) - fix a bug accidentally introduced by the previous change. Task-number: QTBUG-77412 Change-Id: I4277ff47e8d8d3b6b8666fbcd7dc73c827f349c0 Reviewed-by: Volker Hilsheimer --- src/network/access/http2/http2protocol.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/network/access/http2') diff --git a/src/network/access/http2/http2protocol.cpp b/src/network/access/http2/http2protocol.cpp index 0290f9ac00..31da6fd616 100644 --- a/src/network/access/http2/http2protocol.cpp +++ b/src/network/access/http2/http2protocol.cpp @@ -75,9 +75,13 @@ Frame configurationToSettingsFrame(const QHttp2Configuration &config) builder.append(Settings::INITIAL_WINDOW_SIZE_ID); builder.append(config.streamReceiveWindowSize()); - // TODO: Max frame size; in future, if the need - // is proven, we can also set decoding table size - // and header list size. For now, defaults suffice. + if (config.maxFrameSize() != minPayloadLimit) { + builder.append(Settings::MAX_FRAME_SIZE_ID); + builder.append(config.maxFrameSize()); + } + // TODO: In future, if the need is proven, we can + // also send decoding table size and header list size. + // For now, defaults suffice. return builder.outboundFrame(); } -- cgit v1.2.3