docs: @Override
      public T handle(final HttpClientResponse response) throws IOException
      {
          if(allowRedirect && response.isRedirected()) {
              LOG.debug("Redirecting based on '%d' response code", response.getStatusCode());
              throw new RedirectedException(response);
          } else {
              // Find the response stream - the error stream may be valid in cases
              // where the input stream is not.
              InputStream is = null;
              try {
                  is = response.getResponseBodyAsStream();
              }
              catch (IOException e) {
                  LOG.warnDebug(e, "Could not locate response body stream");
                  // normal for 401, 403 and 404 responses, for example...
              }
  
              if (is == null) {
                  // Fall back to zero length response.
                  is = new NullInputStream(0);
              }
  
              try {
                  final Long contentLength = response.getContentLength();
  
                  if (maxBodyLength > 0) {
                      if (contentLength != null && contentLength > maxBodyLength) {
                          throw new SizeExceededException("Content-Length: " + contentLength);
                      }
  
                      LOG.debug("Limiting stream length to '%d'", maxBodyLength);
                      is = new SizeLimitingInputStream(is, maxBodyLength);
                  }
  
                  final String encoding = StringUtils.trimToEmpty(response.getHeader("Content-Encoding"));
  
                  if (StringUtils.equalsIgnoreCase(encoding, "lz4")) {
                      LOG.debug("Found LZ4 stream");
                      is = new LZ4BlockInputStream(is);
                  } else if (StringUtils.equalsIgnoreCase(encoding, "gzip") || StringUtils.equalsIgnoreCase(encoding, "x-gzip")) {
                      LOG.debug("Found GZIP stream");
                      is = new GZIPInputStream(is);
                  }
                  else if (StringUtils.equalsIgnoreCase(encoding, "deflate")) {
                      LOG.debug("Found deflate stream");
                      final Inflater inflater = new Inflater(true);
                      is = new InflaterInputStream(is, inflater);
                  }
  
                  return contentConverter.convert(response, is);
              }
              catch (IOException ioe) {
                  return contentConverter.handleError(response, ioe);
              }
          }
      }