HTTP API: Set `$use_authentication` property of `Requests_Proxy_HTTP` to true when proxy authentication is required.

Props francescobagnoli for initial patch.
Fixes #37494.

git-svn-id: https://develop.svn.wordpress.org/trunk@38173 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling 2016-07-31 18:19:02 +00:00
parent dbe140910b
commit 11e4642c67
1 changed files with 1 additions and 0 deletions

View File

@ -356,6 +356,7 @@ class WP_Http {
$options['proxy'] = new Requests_Proxy_HTTP( $proxy->host() . ':' . $proxy->port() );
if ( $proxy->use_authentication() ) {
$options['proxy']->use_authentication = true;
$options['proxy']->user = $proxy->username();
$options['proxy']->pass = $proxy->password();
}