Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-1822

Support for transparent content decompression

    XMLWordPrintableJSON

    Details

      Description

      Created http processor array like this
      HttpProcessor httpproc = HttpProcessorBuilder.create()
      .add(new RequestDefaultHeaders())
      .add(new RequestAcceptEncoding())
      .add(new RequestClientConnControl())
      .add(new RequestContent())
      .add(new ResponseContentEncoding())
      .add(new RequestTargetHost()).build();

      later http async client constructed as follows

      CloseableHttpAsyncClient httpclient = HttpAsyncClients.custom()
      .setConnectionManager(connManager)
      .setHttpProcessor(httpproc)
      .setUserAgent(hc.getUserAgent())
      .setDefaultRequestConfig(defaultRequestConfig)
      .build();

      during invocation

      Future<HttpResponse> future = httpclient .execute(httpget, null);
      HttpResponse response = future.get();

      entity.getContent() is not decompressed (gzip), however ResponseContentEncoding http processor was executed

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                clajder clajder
              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated: