diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2019-08-20 12:09:42 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2019-08-22 15:36:22 +0200 |
commit | 8d302aea33d54d7930fc700ab44a55e058d7bfcc (patch) | |
tree | 11df6cf5b6fd81e5b03ca59978d785b6672da52a /src/network/access | |
parent | d55712153a357cc5cc975bf599470619b7c77faa (diff) |
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 <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/network/access')
-rw-r--r-- | src/network/access/http2/http2protocol.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
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(); } |