original_string: protected static function getRequestSize($header, $method)
      {
          if($method === 'GET' || $method === 'OPTIONS' || $method === 'HEAD') {
              return strlen($header) + 4;
          }
          $match = array();
          if (preg_match("/\r\nContent-Length: ?(\d+)/i", $header, $match)) {
              $content_length = isset($match[1]) ? $match[1] : 0;
              return $content_length + strlen($header) + 4;
          }
          return $method === 'DELETE' ? strlen($header) + 4 : 0;
      }
code: protected static function getRequestSize($header, $method)
      {
          if($method === 'GET' || $method === 'OPTIONS' || $method === 'HEAD') {
              return strlen($header) + 4;
          }
          $match = array();
          if (preg_match("/\r\nContent-Length: ?(\d+)/i", $header, $match)) {
              $content_length = isset($match[1]) ? $match[1] : 0;
              return $content_length + strlen($header) + 4;
          }
          return $method === 'DELETE' ? strlen($header) + 4 : 0;
      }
code_tokens: protected static function getRequestSize ( $ header , $ method ) { if ( $ method === 'GET' || $ method === 'OPTIONS' || $ method === 'HEAD' ) { return strlen ( $ header ) + 4 ; } $ match = array ( ) ; if ( preg_match ( "/\r\nContent-Length: ?(\d+)/i" , $ header , $ match ) ) { $ content_length = isset ( $ match [ 1 ] ) ? $ match [ 1 ] : 0 ; return $ content_length + strlen ( $ header ) + 4 ; } return $ method === 'DELETE' ? strlen ( $ header ) + 4 : 0 ; }
docstring: Get whole size of the request
  includes the request headers and request body.
  @param string $header The request headers
  @param string $method The request method
  @return integer
docstring_tokens: Get whole size of the request includes the request headers and request body .