Previously it relied on the PHP-level $_SERVER variable; now it will use the HTTPRequest so it works correctly in more situations.