Skip to content

Auto-port 5.0: Make permessage-deflate server window size and memLevel configurable - #16943

Merged
normanmaurer merged 1 commit into
5.0from
auto-port-pr-16809-to-5.0
Jun 12, 2026
Merged

normanmaurer merged 1 commit into
5.0from
auto-port-pr-16809-to-5.0

Conversation

@netty-project-bot

Copy link
Copy Markdown
Contributor

Auto-port of #16809 to 5.0
Cherry-picked commit: 7bae566


Motivation:

PerMessageDeflateServerExtensionHandshaker and DeflateFrameServerExtensionHandshaker hardcode the server-side deflate window size (15) and memory level (8), so applications cannot trade compression ratio for lower per-connection memory (~300KB per connection).

Modification:

Add constructor overloads accepting serverWindowSize (8-15) and memLevel (1-9) to both handshakers. For permessage-deflate the negotiated window is min(client_offer, serverWindowSize) per RFC 7692 §7.1.2.1. Existing constructors delegate with the former defaults.

Result:

Fixes #13083

…16809)

Motivation:

PerMessageDeflateServerExtensionHandshaker and
DeflateFrameServerExtensionHandshaker hardcode the server-side deflate
window size (15) and memory level (8), so applications cannot trade
compression ratio for lower per-connection memory (~300KB per
connection).

Modification:

Add constructor overloads accepting serverWindowSize (8-15) and memLevel
(1-9) to both handshakers. For permessage-deflate the negotiated window
is min(client_offer, serverWindowSize) per RFC 7692 §7.1.2.1. Existing
constructors delegate with the former defaults.

Result:

Fixes #13083

---------

Co-authored-by: Norman Maurer <[email protected]>
(cherry picked from commit 7bae566)
@normanmaurer normanmaurer added this to the 5.0.0.Final milestone Jun 12, 2026
@normanmaurer
normanmaurer merged commit 3f04a3e into 5.0 Jun 12, 2026
13 checks passed
@normanmaurer
normanmaurer deleted the auto-port-pr-16809-to-5.0 branch June 12, 2026 13:37
@normanmaurer normanmaurer mentioned this pull request Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants