Http::getProxy() method to get proxy configuration
authorSébastien Santoro <dereckson@espace-win.org>
Fri, 25 Mar 2016 15:10:19 +0000 (15:10 +0000)
committerSébastien Santoro <dereckson@espace-win.org>
Fri, 25 Mar 2016 15:10:56 +0000 (15:10 +0000)
commit6ae9367cddf8565c948f4d9458b07bb688f2ddc2
tree92880ffa21f47f0f7ce97178d0919388781c55bd
parent36171312ef0e1b9acdea876f300dca8f3ad9982e
Http::getProxy() method to get proxy configuration

MediaWiki currently uses two sources for proxy configuration:
* the $wgHTTPProxy global configuration variable
* the http_proxy environment variable

The HTTP proxy adress to use is a valuable information for
extensions handling directly HTTP requests instead of use
helper classes provided by the core to construct them.

This change offers an Http::getProxy() utility method to get
the configuration, regardless of the source.

Bug: T117954
Change-Id: I5df31845df71f05ac581f532cc9bd7a1fea25583
includes/HttpFunctions.php
tests/phpunit/includes/HttpTest.php