/**
* Returns the server protocol in use on the current server.
*
* @return string The HTTP server protocol version.
*
* @since 1.7.0
*/
public function getHTTPProtocol()
{
if (isset($_SERVER['SERVER_PROTOCOL'])) {
if ($pos = strrpos($_SERVER['SERVER_PROTOCOL'], '/')) {
return substr($_SERVER['SERVER_PROTOCOL'], $pos + 1);
}
}
}