GeezerVison is showing github.com — Enable Websocket compression. Fixes #10863 · playframework/playframework@81bae96
File tree
Expand file treeCollapse file tree
Open diff view settings
transport/server/play-netty-server/src/main/scala/play/core/server
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: transport/server/play-netty-server/src/main/scala/play/core/server/NettyServer.scala +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -34,6 +34,7 @@ import io.netty.channel.uring.IoUringChannelOption |
34 | 34 | import io.netty.channel.uring.IoUringIoHandler |
35 | 35 | import io.netty.channel.uring.IoUringServerSocketChannel |
36 | 36 | import io.netty.handler.codec.http._ |
| 37 | +import io.netty.handler.codec.http.websocketx.extensions.compression.WebSocketServerCompressionHandler |
37 | 38 | import io.netty.handler.logging.LogLevel |
38 | 39 | import io.netty.handler.logging.LoggingHandler |
39 | 40 | import io.netty.handler.ssl.SslHandler |
@@ -274,6 +275,7 @@ class NettyServer( |
274 | 275 | pipeline.addLast("decoder", new HttpRequestDecoder(maxInitialLineLength, maxHeaderSize, maxChunkSize)) |
275 | 276 | pipeline.addLast("encoder", new HttpResponseEncoder()) |
276 | 277 | pipeline.addLast("decompressor", new HttpContentDecompressor()) |
| 278 | + pipeline.addLast("ws-compressor", new WebSocketServerCompressionHandler()) |
277 | 279 | if (logWire) { |
278 | 280 | pipeline.addLast("logging", new LoggingHandler(LogLevel.DEBUG)) |
279 | 281 | } |
|