summaryrefslogtreecommitdiffstats
path: root/system/core/Config.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-11-09 09:56:49 +0100
committerAndrey Andreev <narf@devilix.net>2015-11-09 09:56:49 +0100
commita706b2baa3cfd6930d2c5588a373ab3b0e561978 (patch)
treeaa0c3c344e62200bb9f2f6dd9c0e792637d28d38 /system/core/Config.php
parent2aff25e8d4d7b29c07803d231532d362a5e457dd (diff)
parentcd4e547abbe9e5f4d48bd54d7fc136a01033b480 (diff)
Merge branch 'develop' of github.com:bcit-ci/CodeIgniter into develop
Diffstat (limited to 'system/core/Config.php')
-rw-r--r--system/core/Config.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/system/core/Config.php b/system/core/Config.php
index 0264776f9..c507f342c 100644
--- a/system/core/Config.php
+++ b/system/core/Config.php
@@ -90,7 +90,16 @@ class CI_Config {
{
if (isset($_SERVER['SERVER_ADDR']))
{
- $base_url = (is_https() ? 'https' : 'http').'://'.$_SERVER['SERVER_ADDR']
+ if (strpos($_SERVER['SERVER_ADDR'], ':') !== FALSE)
+ {
+ $server_addr = '['.$_SERVER['SERVER_ADDR'].']';
+ }
+ else
+ {
+ $server_addr = $_SERVER['SERVER_ADDR'];
+ }
+
+ $base_url = (is_https() ? 'https' : 'http').'://'.$server_addr
.substr($_SERVER['SCRIPT_NAME'], 0, strpos($_SERVER['SCRIPT_NAME'], basename($_SERVER['SCRIPT_FILENAME'])));
}
else