Enable compressed responses in feed client
@@ -239,7 +239,7 @@ class ApacheGatewayConnection implements GatewayConnection {
httpPost.addHeader(headerName, headerValue);
});
- if (useCompression) {
+ if (useCompression) { // This causes the apache client to gzip the request content. Weird, huh?
httpPost.setHeader("Content-Encoding", "gzip");
}
return httpPost;
@@ -429,7 +429,6 @@ class ApacheGatewayConnection implements GatewayConnection {
clientBuilder.setMaxConnTotal(1);
clientBuilder.setUserAgent(String.format("vespa-http-client (%s)", Vtag.V_TAG_COMPONENT));
clientBuilder.setDefaultHeaders(Collections.singletonList(new BasicHeader(Headers.CLIENT_VERSION, Vtag.V_TAG_COMPONENT)));
- clientBuilder.disableContentCompression();
RequestConfig.Builder requestConfigBuilder = RequestConfig.custom();
requestConfigBuilder.setSocketTimeout(0);
if (connectionParams.getProxyHost() != null) {
