Skip to content

Commit

Permalink
HTTP API: Update Requests.
Browse files Browse the repository at this point in the history
Fixes an issue where you couldn't set a `Requests_Proxy_HTTP` object as a proxy setting.

See WordPress/Requests#223.
See #37107, #33055.
Built from https://develop.svn.wordpress.org/trunk@38053


git-svn-id: http://core.svn.wordpress.org/trunk@37994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
ocean90 committed Jul 13, 2016
1 parent 2ecdbf3 commit 5f862c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions wp-includes/class-requests.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ public static function patch($url, $headers, $data = array(), $options = array()
* for Basic authentication
* (Requests_Auth|array|boolean, default: false)
* - `proxy`: Proxy details to use for proxy by-passing and authentication
* (Requests_Proxy|array|boolean, default: false)
* (Requests_Proxy|array|string|boolean, default: false)
* - `max_bytes`: Limit for the response body size.
* (integer|boolean, default: false)
* - `idn`: Enable IDN parsing
Expand Down Expand Up @@ -575,7 +575,7 @@ protected static function set_defaults(&$url, &$headers, &$data, &$type, &$optio
$options['auth']->register($options['hooks']);
}

if (!empty($options['proxy'])) {
if (is_string($options['proxy']) || is_array($options['proxy'])) {
$options['proxy'] = new Requests_Proxy_HTTP($options['proxy']);
}
if ($options['proxy'] !== false) {
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.6-beta2-38052';
$wp_version = '4.6-beta2-38053';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit 5f862c6

Please sign in to comment.