aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2014-05-29 18:32:55 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2014-05-29 18:32:55 +0200
commit79024eb004bfb9de77ec60d648315888e70033ad (patch)
treeecd936e23c1c2637d91564ef9dcb21bf956715a9 /inc/poche
parent0c3db64585a605375147a4209938f9e028b79089 (diff)
downloadwallabag-79024eb004bfb9de77ec60d648315888e70033ad.tar.gz
wallabag-79024eb004bfb9de77ec60d648315888e70033ad.tar.zst
wallabag-79024eb004bfb9de77ec60d648315888e70033ad.zip
fix #344 FQDN with non-standard ports broken
Diffstat (limited to 'inc/poche')
-rwxr-xr-xinc/poche/Tools.class.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php
index 7f064020..8073a3fe 100755
--- a/inc/poche/Tools.class.php
+++ b/inc/poche/Tools.class.php
@@ -60,6 +60,10 @@ class Tools
60 } 60 }
61 61
62 $host = (isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'])); 62 $host = (isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']));
63
64 if (strpos($host, ':') !== false) {
65 $serverport = '';
66 }
63 67
64 return 'http' . ($https ? 's' : '') . '://' 68 return 'http' . ($https ? 's' : '') . '://'
65 . $host . $serverport . $scriptname; 69 . $host . $serverport . $scriptname;