From 3e65ae353ab795157d25bc229a94388b4302a64a Mon Sep 17 00:00:00 2001 From: Martok Date: Sun, 31 Dec 2023 02:31:08 +0100 Subject: [PATCH] Issue #2430 - Allow network.http.spdy.chunk-size to be larger than 16K According to https://datatracker.ietf.org/doc/html/rfc7540#section-4.2 The size of a frame payload is limited by the maximum size that a receiver advertises in the SETTINGS_MAX_FRAME_SIZE setting. This setting can have any value between 2^14 (16,384) and 2^24-1 (16,777,215) octets, inclusive. --- netwerk/protocol/http/nsHttpHandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp index a4e481fcac..3a5ec2936c 100644 --- a/netwerk/protocol/http/nsHttpHandler.cpp +++ b/netwerk/protocol/http/nsHttpHandler.cpp @@ -1362,10 +1362,10 @@ nsHttpHandler::PrefsChanged(nsIPrefBranch *prefs, const char *pref) } if (PREF_CHANGED(HTTP_PREF("spdy.chunk-size"))) { - // keep this within http/2 ranges of 1 to 2^14-1 + // keep this within http/2 ranges of 1 to 2^24-1 rv = prefs->GetIntPref(HTTP_PREF("spdy.chunk-size"), &val); if (NS_SUCCEEDED(rv)) - mSpdySendingChunkSize = (uint32_t) clamped(val, 1, 0x3fff); + mSpdySendingChunkSize = (uint32_t) clamped(val, 1, 0xffffff); } // The amount of idle seconds on a spdy connection before initiating a