code: public static long getContentLength(HttpMessage message, long defaultValue) {
          String value = message.headers().get(HttpHeaderNames.CONTENT_LENGTH);
          if (value != null) {
              return Long.parseLong(value);
          }
  
          // We know the content length if it's a Web Socket message even if
          // Content-Length header is missing.
          long webSocketContentLength = getWebSocketContentLength(message);
          if (webSocketContentLength >= 0) {
              return webSocketContentLength;
          }
  
          // Otherwise we don't.
          return defaultValue;
      }
docs: Returns the length of the content or the specified default value if the message does not have the {@code
  "Content-Length" header}. Please note that this value is not retrieved from {@link HttpContent#content()} but
  from the {@code "Content-Length"} header, and thus they are independent from each other.
  
  @param message      the message
  @param defaultValue the default value
  @return the content length or the specified default value
  @throws NumberFormatException if the {@code "Content-Length"} header does not parse as a long