diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml index 1499edf4ab07..63cb04a1c8ba 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml @@ -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 diff --git a/netwerk/protocol/http/Http2Session.cpp b/netwerk/protocol/http/Http2Session.cpp index ffa7eb52ad71..717dd65738ba 100644 --- a/netwerk/protocol/http/Http2Session.cpp +++ b/netwerk/protocol/http/Http2Session.cpp @@ -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; }