Bug 1919750 - Don't send SETTINGS_TYPE_MAX_CONCURRENT when push is disabled a=dmeehan

Original Revision: https://phabricator.services.mozilla.com/D222778

Differential Revision: https://phabricator.services.mozilla.com/D230530
This commit is contained in:
Valentin Gosu 2024-11-28 14:40:53 +00:00
parent 0bbde3efdd
commit 43ec029640
2 changed files with 15 additions and 5 deletions

View file

@ -13262,6 +13262,14 @@
value: false
mirror: always
# When true, Firefox will send a SETTINGS_MAX_CONCURRENT_STREAMS
# parameter when push is disabled. Chrome doesn't send this,
# so some servers misbehave when we do. See Bug 1919750.
- name: network.http.http2.send-push-max-concurrent-frame
type: RelaxedAtomicBool
value: false
mirror: always
- name: network.http.http2.push-allowance
type: RelaxedAtomicInt32
value: 131072 # 128KB

View file

@ -1035,11 +1035,13 @@ void Http2Session::SendHello() {
// The value portion of the setting pair is already initialized to 0
numberOfEntries++;
NetworkEndian::writeUint16(
packet + kFrameHeaderBytes + (6 * numberOfEntries),
SETTINGS_TYPE_MAX_CONCURRENT);
// The value portion of the setting pair is already initialized to 0
numberOfEntries++;
if (StaticPrefs::network_http_http2_send_push_max_concurrent_frame()) {
NetworkEndian::writeUint16(
packet + kFrameHeaderBytes + (6 * numberOfEntries),
SETTINGS_TYPE_MAX_CONCURRENT);
// The value portion of the setting pair is already initialized to 0
numberOfEntries++;
}
mWaitingForSettingsAck = true;
}