GeezerVison is showing github.com — Enable Websocket compression. Fixes #10863 · playframework/playframework@b424797
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 |
|---|
@@ -27,6 +27,7 @@ import io.netty.channel.nio.NioEventLoopGroup |
27 | 27 | import io.netty.channel.socket.nio.NioServerSocketChannel |
28 | 28 | import io.netty.channel.unix.UnixChannelOption |
29 | 29 | import io.netty.handler.codec.http._ |
| 30 | +import io.netty.handler.codec.http.websocketx.extensions.compression.WebSocketServerCompressionHandler |
30 | 31 | import io.netty.handler.logging.LogLevel |
31 | 32 | import io.netty.handler.logging.LoggingHandler |
32 | 33 | import io.netty.handler.ssl.SslHandler |
@@ -236,6 +237,7 @@ class NettyServer( |
236 | 237 | pipeline.addLast("decoder", new HttpRequestDecoder(maxInitialLineLength, maxHeaderSize, maxChunkSize)) |
237 | 238 | pipeline.addLast("encoder", new HttpResponseEncoder()) |
238 | 239 | pipeline.addLast("decompressor", new HttpContentDecompressor()) |
| 240 | + pipeline.addLast("ws-compressor", new WebSocketServerCompressionHandler()) |
239 | 241 | if (logWire) { |
240 | 242 | pipeline.addLast("logging", new LoggingHandler(LogLevel.DEBUG)) |
241 | 243 | } |
|