Commit 468c8d4b authored by mikeytown2's avatar mikeytown2

Issue #2205871 by mikeytown2: cleanup .install file; use httprl_get_hostname().

parent 993d30fc
......@@ -186,20 +186,7 @@ function httprl_install_http_test($mode, $blocking = FALSE, $depth = 0) {
}
$msg = '';
if (!empty($_SERVER['HTTP_HOST'])) {
$hostname = $_SERVER['HTTP_HOST'];
// If HTTP_HOST contains the port, use SERVER_NAME.
if (strpos($_SERVER['HTTP_HOST'], ':') !== FALSE) {
$hostname = $_SERVER['SERVER_NAME'];
}
}
elseif (!empty($_SERVER['SERVER_NAME'])) {
$hostname = $_SERVER['SERVER_NAME'];
}
else {
$hostname = '';
}
$hostname = httprl_get_hostname();
// Set the headers to point to this hostname.
$headers = array(
'Host' => $hostname,
......@@ -326,21 +313,10 @@ function httprl_install_http_test($mode, $blocking = FALSE, $depth = 0) {
}
}
else {
if (!empty($_SERVER['HTTP_HOST'])) {
$hostname = $_SERVER['HTTP_HOST'];
// If HTTP_HOST contains the port, use SERVER_NAME.
if (strpos($_SERVER['HTTP_HOST'], ':') !== FALSE) {
$hostname = $_SERVER['SERVER_NAME'];
}
}
elseif (!empty($_SERVER['SERVER_NAME'])) {
$hostname = $_SERVER['SERVER_NAME'];
}
else {
$hostname = '';
}
$hostname = httprl_get_hostname();
// Set httprl_server_hostname to the HTTP_HOST or SERVER_NAME.
// Check if the httprl_server_hostname needs to be set to HTTP_HOST or
// SERVER_NAME.
if ( !empty($hostname)
&& $hostname !== 'default'
&& ip2long($hostname) === FALSE
......
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