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

setContentCompressionEnabled(true) does not work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 5.1.3
    • None
    • HttpClient (async)
    • None

    Description

      CloseableHttpAsyncClient client = HttpAsyncClients.custom()
              .disableAuthCaching()
              .disableCookieManagement()
              .setVersionPolicy(FORCE_HTTP_1)
              .setDefaultRequestConfig(RequestConfig.custom()
                      .setContentCompressionEnabled(true)
                      .build())
              .build(); 
      
      We are migrating away from old apache sync client in favor of CloseableHttpAsyncClient. However, the new async client is not respecting the client configuration of contentCompression.  The old client would call down into ProtocolExec -> httpProcessor.process(request, context) -> which would go into interceptor RequestAcceptEncoding and if you wanted compression, it would add the Accept-Encoding header.  This new client is not doing that.    

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              patrickjamesbarry Patrick Barry
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: