http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60996
Revision: 60996 Author: dale Date: 2010-01-12 23:50:43 +0000 (Tue, 12 Jan 2010) Log Message: ----------- * update to r60811 to check ->proxy for "ignore" / false condition for php upload Modified Paths: -------------- branches/js2-work/phase3/includes/HttpFunctions.php Modified: branches/js2-work/phase3/includes/HttpFunctions.php =================================================================== --- branches/js2-work/phase3/includes/HttpFunctions.php 2010-01-12 23:49:24 UTC (rev 60995) +++ branches/js2-work/phase3/includes/HttpFunctions.php 2010-01-12 23:50:43 UTC (rev 60996) @@ -11,7 +11,7 @@ // Syncronous download (in a single request) const SYNC_DOWNLOAD = 1; - // Asynchronous download ( background process with multiple requests ) + // Asynchronous download ( background process with multiple status requests ) const ASYNC_DOWNLOAD = 2; /** @@ -66,7 +66,7 @@ } $head = $headResponse->value; - // check for redirects: + // Check for redirects: if( isset( $head['Location'] ) && strrpos( $head[0], '302' ) !== false ) { if( $redirectCount < $wgMaxRedirects ) { if( self::isValidURI( $head['Location'] ) ) { @@ -92,7 +92,7 @@ } } - // check if we can find phpCliPath (for doing a background shell request to + // Check if we can find $wgPhpCli (for doing a background shell request to // php to do the download: if( $wgPhpCli && wfShellExecEnabled() && $dl_mode == self::ASYNC_DOWNLOAD ) { wfDebug( __METHOD__ . "\nASYNC_DOWNLOAD\n" ); @@ -528,12 +528,15 @@ ); // Proxy setup: - if( $this->proxy ){ - $httpContextOptions['proxy'] = 'tcp://' . $this->proxy; - }else if ( Http::isLocalURL( $this->url ) ) { - $httpContextOptions['proxy'] = 'tcp://localhost:80'; - } elseif ( $wgHTTPProxy ) { - $httpContextOptions['proxy'] = 'tcp://' . $wgHTTPProxy ; + // only do proxy setup if ( not suppressed $this->proxy === false ) + if( $this->proxy !== false ){ + if( $this->proxy ){ + $httpContextOptions['proxy'] = 'tcp://' . $this->proxy; + }else if ( Http::isLocalURL( $this->url ) ) { + $httpContextOptions['proxy'] = 'tcp://localhost:80'; + } elseif ( $wgHTTPProxy ) { + $httpContextOptions['proxy'] = 'tcp://' . $wgHTTPProxy ; + } } $fcontext = stream_context_create ( _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs