public function hasHeader($name)
 {
     return $this->headers->has($name);
 }
 /**
  * @param ParameterCollection $server
  * @param HeaderCollection    $headers
  *
  * @return string
  */
 private function getPathAndQuery(ParameterCollection $server, HeaderCollection $headers) : string
 {
     $result = '';
     if ($headers->has('X-Rewrite-Url')) {
         $result = $headers->get('X-Rewrite-Url');
     } elseif ($server->has('REQUEST_URI')) {
         $result = $server->get('REQUEST_URI');
     }
     if (strpos($result, '://')) {
         $path = @parse_url($result, PHP_URL_PATH);
         if ($path !== false) {
             $result = $path;
         }
     }
     return $result;
 }