com web/php: Whops. fail fail. Set the hostname when no port is set: include/prepend.inc
| From: | Paul Dragoonis | Date: | Wed, 11 Dec 2013 01:31:32 +0000 |
| Subject: | com web/php: Whops. fail fail. Set the hostname when no port is set: include/prepend.inc | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-22351@lists.php.net to get a copy of this message | ||
Commit: ce0f6a72ca222c097e7619c3607fd1351bbf8007
Author: Hannes Magnusson <bjori@mongodb.com> Tue, 10 Dec 2013 17:31:32 -0800
Parents: e980127acb6dcab30a2501b6ad0e33b5f830a10d
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=ce0f6a72ca222c097e7619c3607fd1351bbf8007
Log:
Whops. fail fail. Set the hostname when no port is set
Changed paths:
M include/prepend.inc
Diff:
diff --git a/include/prepend.inc b/include/prepend.inc
index 03f8ab2..2337268 100644
--- a/include/prepend.inc
+++ b/include/prepend.inc
@@ -20,6 +20,8 @@ if (isset($_SERVER["HTTP_ORIGIN"])) {
}
if (isset($host["port"])) {
$hostname = $host["host"] . ":" . $host["port"];
+ } else {
+ $hostname = $host["host"];
}
header("Access-Control-Allow-Origin: http://$hostname");