Skip to content

Commit

Permalink
Enable compressed responses in feed client
Browse files Browse the repository at this point in the history
  • Loading branch information
jonmv committed Sep 30, 2020
1 parent d653fb8 commit c068007
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -239,7 +239,7 @@ private HttpPost createPost(boolean drain, boolean useCompression, boolean isHan
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;
Expand Down Expand Up @@ -429,7 +429,6 @@ public CloseableHttpClient createClient() {
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) {
Expand Down

0 comments on commit c068007

Please sign in to comment.