X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FWebRequest.php;h=b187c4acef82f1c91d13cb218e86eb775780f860;hb=6b0d5a7b4ecd33833eb9d6e5582395b5b39e7037;hp=a1fa0eb775d00a2f78f708b0139b00bd0bdda029;hpb=a8b5e408bf8df6a02d18c70ad22ec14f2333abd4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/WebRequest.php b/includes/WebRequest.php index a1fa0eb775..b187c4acef 100644 --- 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