I am on version 0.8.1
I have a problem with netty and content compression.
The following code does not compress anything from resources().
val binding = SocketBinding(port, "localhost")
unfiltered.netty.Server.bind(binding)
.handler(
new ChannelInitializer[SocketChannel] {
def initChannel(channel: SocketChannel) =
channel.pipeline
.addAfter("handler-1", "compressor", new HttpContentCompressor) // hack!
}
)
.chunked(1048576)
.resources(getClass.getResource("/public"))
.plan(Planify {
case req =>
implicit val r = req
reply(r)
})
How would I achieve content compression of resources under /public ?
Thanks.