private static function aggregateHttpProtocolVersionFromServer($server)
    {
        if (!isset($server['SERVER_PROTOCOL'])) {
            return null;
        }

        $pattern = '/^(?P<scheme>HTTP)\/(?P<protocol_version>1\.(0|1))$/';

        if (!preg_match($pattern, $server['SERVER_PROTOCOL'], $q)) {
            return null;
        }

        return $q['protocol_version'];
    }