aboutsummaryrefslogtreecommitdiffstats
path: root/vespa-http-client
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2020-09-30 16:11:12 +0200
committerJon Marius Venstad <venstad@gmail.com>2020-09-30 16:11:12 +0200
commitc068007feadd8c3f8332c7e80db9ad6e2e2a8093 (patch)
treecaea4897ea0bbedc7fdbdde79e42bba043452da3 /vespa-http-client
parentd653fb84a9cc5d5224cb4aea5c120dfac9e75a67 (diff)
Enable compressed responses in feed client
Diffstat (limited to 'vespa-http-client')
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java
index bd5cf761024..16dd90ed7ac 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java
@@ -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) {