docs: private HttpInvalidMessageException checkRequestValidity() {
          if (shouldReadResponseImmediately()) {
              // ignore body validation as this might happen after sending only
              // the headers if 100-continue, Upgrade, immediate-read, etc.
              return null;
          }
          long len = getRequest().getContentLength();
          long num = getNumBytesWritten();
          if (HeaderStorage.NOTSET != len && num != len) {
              // content-length does not match the number of bytes sent, have to
              // close the connection since the other end won't be able to read
              // the body properly
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, "Request had content-length of " + len + " but sent " + num);
              }
              setPersistent(false);
              return new HttpInvalidMessageException("Request length " + len + " but sent " + num);
          }
          return null;
      }