From: Aaron Schulz Date: Fri, 18 Jan 2013 18:55:01 +0000 (-0800) Subject: Http function logic cleanups and comments. X-Git-Tag: 1.31.0-rc.0~20988 X-Git-Url: http://git.cyclocoop.org/%22.%20%20%20generer_url_action%28%22logout%22%2C%22logout=prive%22%29%20.%20%20%20%22?a=commitdiff_plain;h=5c8245acdffd8ff5f52638b85520c54b0aed6b9b;p=lhc%2Fweb%2Fwiklou.git Http function logic cleanups and comments. Change-Id: Ibe309246960491958870610f69c253bf3ccc1637 --- diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index ab27a7437d..b1092df88f 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -328,10 +328,13 @@ class MWHttpRequest { public function proxySetup() { global $wgHTTPProxy; - if ( $this->proxy || !$this->noProxy ) { + // If there is an explicit proxy set and proxies are not disabled, then use it + if ( $this->proxy && !$this->noProxy ) { return; } + // Otherwise, fallback to $wgHTTPProxy/http_proxy (when set) if this is not a machine + // local URL and proxies are not disabled if ( Http::isLocalURL( $this->url ) || $this->noProxy ) { $this->proxy = ''; } elseif ( $wgHTTPProxy ) {