Merge "Use a LinkBatch for the creator/last editor user (talk) pages in InfoAction"
[lhc/web/wiklou.git] / includes / HttpFunctions.php
index ab27a74..b1092df 100644 (file)
@@ -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 ) {