You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make permessage-deflate server window size and memLevel configurable (#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]>
Copy file name to clipboardExpand all lines: codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/compression/DeflateEncoder.java
Copy file name to clipboardExpand all lines: codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/compression/DeflateFrameServerExtensionHandshaker.java
Copy file name to clipboardExpand all lines: codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/compression/PerFrameDeflateEncoder.java
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -51,6 +51,20 @@ class PerFrameDeflateEncoder extends DeflateEncoder {
Copy file name to clipboardExpand all lines: codec-http/src/main/java/io/netty/handler/codec/http/websocketx/extensions/compression/PerMessageDeflateEncoder.java
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,20 @@ class PerMessageDeflateEncoder extends DeflateEncoder {
0 commit comments