git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit 64b03439 authored by Evan Prodromou's avatar Evan Prodromou

Check for HTTP_HOST before fetching it

parent 5f2b6292
......@@ -1307,11 +1307,11 @@ function common_inject_session($url, $serverpart = null)
{
if (common_have_session()) {
if (empty($serverpart)) {
$serverpart = parse_url($url, PHP_URL_HOST);
}
if (empty($serverpart)) {
$serverpart = parse_url($url, PHP_URL_HOST);
}
$currentServer = $_SERVER['HTTP_HOST'];
$currentServer = (array_has_key('HTTP_HOST')) ? $_SERVER['HTTP_HOST'] : null;
// Are we pointing to another server (like an SSL server?)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment