code: public static function doesRequestHaveBody($request)
      {
          if (self::hasHeader($request, 'Transfer-Encoding')) {
              return true;
          };
  
          if (1 > self::getHeader($request, 'Content-Length')) {
              return false;
          }
  
          return true;
      }
docs: Does the HTTP request contain body content?
  
  "The presence of a message-body in a request is signaled by the inclusion of a Content-Length or
  Transfer-Encoding header field in the request's message-headers."
  https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.3
  
  However, some browsers send a Content-Length header with an empty string for e.g. GET requests
  without any message-body. Therefore rather than checking for the existence of a Content-Length
  header, we will allow an empty value to indicate that the request does not contain body.
  
  @param RequestInterface|SymfonyRequest $request
  @return bool