docs: protected HttpInvalidMessageException checkResponseValidity() {
          // if this wasn't a HEAD request, then check to make sure we sent the
          // same amount of bytes that were in the content-length header
          if (!MethodValues.HEAD.equals(getRequest().getMethodValue())) {
              long len = getResponse().getContentLength();
              long num = getNumBytesWritten();
              if (HeaderStorage.NOTSET != len && num != len) {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(tc, "Response had content-length of " + Long.toString(len) + " but sent " + Long.toString(num));
                  }
                  if (getHttpConfig().getDebugLog().isEnabled(DebugLog.Level.ERROR)) {
                      getHttpConfig().getDebugLog().log(DebugLog.Level.ERROR, HttpMessages.MSG_CONN_INVALID_LENGTHS + Long.toString(len) + " but sent " + Long.toString(num), this);
  
                  }
                  setPersistent(false);
                  return new HttpInvalidMessageException("Response length: " + Long.toString(len) + " " + Long.toString(num));
              }
          }
          return null;
      }