apple / servicetalk

A networking framework that evolves with your application
https://docs.servicetalk.io
Apache License 2.0
927 stars 181 forks source link

Preserve default `Http2Settings` when `Http2SettingsBuilder` is used #3092

Closed idelpivnitskiy closed 2 weeks ago

idelpivnitskiy commented 2 weeks ago

Motivation:

By default we set values for MAX_HEADER_LIST_SIZE and INITIAL_WINDOW_SIZE settings at H2ProtocolConfigBuilder level. However, if users want to change only one setting (for example, MAX_CONCURRENT_STREAMS), they lose our defaults when they use Http2SettingsBuilder.

Modifications:

Result:

Users always start with consistent default Http2Settings and can use builder methods to override what they want.