From 8a5dd90885347de6b765d9269dc5e99bbbdb3c25 Mon Sep 17 00:00:00 2001 From: kimchy Date: Wed, 30 Mar 2011 14:46:39 +0200 Subject: [PATCH] HTTP: Support compression (gzip, deflate) when using Accept-Encoding header, closes #815. --- .../http/netty/NettyHttpServerTransport.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/http/netty/NettyHttpServerTransport.java b/modules/elasticsearch/src/main/java/org/elasticsearch/http/netty/NettyHttpServerTransport.java index d485e58c231..7c6645e2ffb 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/http/netty/NettyHttpServerTransport.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/http/netty/NettyHttpServerTransport.java @@ -27,9 +27,7 @@ import org.elasticsearch.common.netty.bootstrap.ServerBootstrap; import org.elasticsearch.common.netty.channel.*; import org.elasticsearch.common.netty.channel.socket.nio.NioServerSocketChannelFactory; import org.elasticsearch.common.netty.channel.socket.oio.OioServerSocketChannelFactory; -import org.elasticsearch.common.netty.handler.codec.http.HttpChunkAggregator; -import org.elasticsearch.common.netty.handler.codec.http.HttpRequestDecoder; -import org.elasticsearch.common.netty.handler.codec.http.HttpResponseEncoder; +import org.elasticsearch.common.netty.handler.codec.http.*; import org.elasticsearch.common.netty.handler.timeout.ReadTimeoutException; import org.elasticsearch.common.netty.logging.InternalLogger; import org.elasticsearch.common.netty.logging.InternalLoggerFactory; @@ -43,6 +41,7 @@ import org.elasticsearch.common.transport.PortsRange; import org.elasticsearch.common.unit.ByteSizeUnit; import org.elasticsearch.common.unit.ByteSizeValue; import org.elasticsearch.http.*; +import org.elasticsearch.http.HttpRequest; import org.elasticsearch.transport.BindTransportException; import org.elasticsearch.transport.netty.NettyInternalESLoggerFactory; @@ -76,6 +75,10 @@ public class NettyHttpServerTransport extends AbstractLifecycleComponent Integer.MAX_VALUE) { logger.warn("maxContentLength[" + maxContentLength + "] set to high value, resetting it to [100mb]"); @@ -151,8 +157,14 @@ public class NettyHttpServerTransport extends AbstractLifecycleComponent