private static function parseHeaders(array $serverVars): HeaderCollectionInterface
    {
        $headers = new HeaderCollection();
        $headersArray = self::getHeadersArray($serverVars);

        foreach ($headersArray as $name => $value) {
            $headers->add(strval($name), $value);
        }

        return $headers;
    }