com web/php: Whops. fail fail. Set the hostname when no port is set: include/prepend.inc
| From: | Hannes Magnusson | 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-17490@lists.php.net to get a copy of this message | ||
Commit: 4f517956355cd773a455a1d05caef6079b060757
Author: Hannes Magnusson <bjori@mongodb.com> Tue, 10 Dec 2013 17:31:32 -0800
Parents: 546998eab548c4747a62d736ff97c4f538f51f79
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=4f517956355cd773a455a1d05caef6079b060757
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");