docs: private InputStream readResponseBody(HttpConnection conn)
          throws HttpException, IOException {
  
          LOG.trace("enter HttpMethodBase.readResponseBody(HttpConnection)");
  
          responseBody = null;
          InputStream is = conn.getResponseInputStream();
          if (Wire.CONTENT_WIRE.enabled()) {
              is = new WireLogInputStream(is, Wire.CONTENT_WIRE);
          }
          boolean canHaveBody = canResponseHaveBody(statusLine.getStatusCode());
          InputStream result = null;
          Header transferEncodingHeader = responseHeaders.getFirstHeader("Transfer-Encoding");
          // We use Transfer-Encoding if present and ignore Content-Length.
          // RFC2616, 4.4 item number 3
          if (transferEncodingHeader != null) {
  
              String transferEncoding = transferEncodingHeader.getValue();
              if (!"chunked".equalsIgnoreCase(transferEncoding) 
                  && !"identity".equalsIgnoreCase(transferEncoding)) {
                  if (LOG.isWarnEnabled()) {
                      LOG.warn("Unsupported transfer encoding: " + transferEncoding);
                  }
              }
              HeaderElement[] encodings = transferEncodingHeader.getElements();
              // The chunked encoding must be the last one applied
              // RFC2616, 14.41
              int len = encodings.length;            
              if ((len > 0) && ("chunked".equalsIgnoreCase(encodings[len - 1].getName()))) { 
                  // if response body is empty
                  if (conn.isResponseAvailable(conn.getParams().getSoTimeout())) {
                      result = new ChunkedInputStream(is, this);
                  } else {
                      if (getParams().isParameterTrue(HttpMethodParams.STRICT_TRANSFER_ENCODING)) {
                          throw new ProtocolException("Chunk-encoded body declared but not sent");
                      } else {
                          LOG.warn("Chunk-encoded body missing");
                      }
                  }
              } else {
                  LOG.info("Response content is not chunk-encoded");
                  // The connection must be terminated by closing 
                  // the socket as per RFC 2616, 3.6
                  setConnectionCloseForced(true);
                  result = is;  
              }
          } else {
              long expectedLength = getResponseContentLength();
              if (expectedLength == -1) {
                  if (canHaveBody && this.effectiveVersion.greaterEquals(HttpVersion.HTTP_1_1)) {
                      Header connectionHeader = responseHeaders.getFirstHeader("Connection");
                      String connectionDirective = null;
                      if (connectionHeader != null) {
                          connectionDirective = connectionHeader.getValue();
                      }
                      if (!"close".equalsIgnoreCase(connectionDirective)) {
                          LOG.info("Response content length is not known");
                          setConnectionCloseForced(true);
                      }
                  }
                  result = is;            
              } else {
                  result = new ContentLengthInputStream(is, expectedLength);
              }
          } 
  
          // See if the response is supposed to have a response body
          if (!canHaveBody) {
              result = null;
          }
          // if there is a result - ALWAYS wrap it in an observer which will
          // close the underlying stream as soon as it is consumed, and notify
          // the watcher that the stream has been consumed.
          if (result != null) {
  
              result = new AutoCloseInputStream(
                  result,
                  new ResponseConsumedWatcher() {
                      @Override
                      public void responseConsumed() {
                          responseBodyConsumed();
                      }
                  }
              );
          }
  
          return result;
      }