dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
40e3595
)
Merge "Use protocol default port with HTTP_X_FORWARDED_PROTO"
author
jenkins-bot
<jenkins-bot@gerrit.wikimedia.org>
Wed, 3 Sep 2014 03:51:55 +0000
(
03:51
+0000)
committer
Gerrit Code Review
<gerrit@wikimedia.org>
Wed, 3 Sep 2014 03:51:55 +0000
(
03:51
+0000)
includes/WebRequest.php
patch
|
blob
|
history
diff --git
a/includes/WebRequest.php
b/includes/WebRequest.php
index
a1fa0eb
..
b187c4a
100644
(file)
--- a/
includes/WebRequest.php
+++ b/
includes/WebRequest.php
@@
-181,7
+181,12
@@
class WebRequest {
continue;
}
$host = $parts[0];
- if ( $parts[1] === false ) {
+ if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) ) {
+ // Bug 70021: Assume that upstream proxy is running on the default
+ // port based on the protocol. We have no reliable way to determine
+ // the actual port in use upstream.
+ $port = $stdPort;
+ } elseif ( $parts[1] === false ) {
if ( isset( $_SERVER['SERVER_PORT'] ) ) {
$port = $_SERVER['SERVER_PORT'];
} // else leave it as $stdPort