Fix the case-sensitivity of some HTTP class usage.
See #33413. Built from https://develop.svn.wordpress.org/trunk@34123 git-svn-id: http://core.svn.wordpress.org/trunk@34091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bc6af23302
commit
3a0db2a22f
|
@ -304,16 +304,20 @@ class WP_Http {
|
|||
*
|
||||
* @since 3.7.0
|
||||
*
|
||||
* @param array $value Array of HTTP transports to check. Default array contains
|
||||
* @param array $transports Array of HTTP transports to check. Default array contains
|
||||
* 'curl', and 'streams', in that order.
|
||||
* @param array $args HTTP request arguments.
|
||||
* @param string $url The URL to request.
|
||||
*/
|
||||
$request_order = apply_filters( 'http_api_transports', array( 'curl', 'streams' ), $args, $url );
|
||||
$transports = array( 'curl', 'streams' );
|
||||
$request_order = apply_filters( 'http_api_transports', $transports, $args, $url );
|
||||
|
||||
// Loop over each transport on each HTTP request looking for one which will serve this request's needs.
|
||||
foreach ( $request_order as $transport ) {
|
||||
$class = 'WP_HTTP_' . $transport;
|
||||
if ( in_array( $transport, $transports ) ) {
|
||||
$transport = ucfirst( $transport );
|
||||
}
|
||||
$class = 'WP_Http_' . $transport;
|
||||
|
||||
// Check to see if this transport is a possibility, calls the transport statically.
|
||||
if ( !call_user_func( array( $class, 'test' ), $args, $url ) )
|
||||
|
@ -548,7 +552,7 @@ class WP_Http {
|
|||
// Upgrade any name => value cookie pairs to WP_HTTP_Cookie instances.
|
||||
foreach ( $r['cookies'] as $name => $value ) {
|
||||
if ( ! is_object( $value ) )
|
||||
$r['cookies'][ $name ] = new WP_HTTP_Cookie( array( 'name' => $name, 'value' => $value ) );
|
||||
$r['cookies'][ $name ] = new WP_Http_Cookie( array( 'name' => $name, 'value' => $value ) );
|
||||
}
|
||||
|
||||
$cookies_header = '';
|
||||
|
@ -736,11 +740,11 @@ class WP_Http {
|
|||
if ( empty( $url ) )
|
||||
return $maybe_relative_path;
|
||||
|
||||
if ( ! $url_parts = WP_HTTP::parse_url( $url ) ) {
|
||||
if ( ! $url_parts = WP_Http::parse_url( $url ) ) {
|
||||
return $maybe_relative_path;
|
||||
}
|
||||
|
||||
if ( ! $relative_url_parts = WP_HTTP::parse_url( $maybe_relative_path ) ) {
|
||||
if ( ! $relative_url_parts = WP_Http::parse_url( $maybe_relative_path ) ) {
|
||||
return $maybe_relative_path;
|
||||
}
|
||||
|
||||
|
@ -824,7 +828,7 @@ class WP_Http {
|
|||
if ( is_array( $redirect_location ) )
|
||||
$redirect_location = array_pop( $redirect_location );
|
||||
|
||||
$redirect_location = WP_HTTP::make_absolute_url( $redirect_location, $url );
|
||||
$redirect_location = WP_Http::make_absolute_url( $redirect_location, $url );
|
||||
|
||||
// POST requests should not POST to a redirected location.
|
||||
if ( 'POST' == $args['method'] ) {
|
||||
|
|
|
@ -294,7 +294,7 @@ class WP_Http_Streams {
|
|||
);
|
||||
|
||||
// Handle redirects.
|
||||
if ( false !== ( $redirect_response = WP_HTTP::handle_redirects( $url, $r, $response ) ) )
|
||||
if ( false !== ( $redirect_response = WP_Http::handle_redirects( $url, $r, $response ) ) )
|
||||
return $redirect_response;
|
||||
|
||||
// If the body was chunk encoded, then decode it.
|
||||
|
@ -343,7 +343,7 @@ class WP_Http_Streams {
|
|||
* If the request is being made to an IP address, we'll validate against IP fields
|
||||
* in the cert (if they exist)
|
||||
*/
|
||||
$host_type = ( WP_HTTP::is_ip_address( $host ) ? 'ip' : 'dns' );
|
||||
$host_type = ( WP_Http::is_ip_address( $host ) ? 'ip' : 'dns' );
|
||||
|
||||
$certificate_hostnames = array();
|
||||
if ( ! empty( $cert['extensions']['subjectAltName'] ) ) {
|
||||
|
|
|
@ -3997,7 +3997,7 @@ function _links_add_base( $m ) {
|
|||
return $m[1] . '=' . $m[2] .
|
||||
( preg_match( '#^(\w{1,20}):#', $m[3], $protocol ) && in_array( $protocol[1], wp_allowed_protocols() ) ?
|
||||
$m[3] :
|
||||
WP_HTTP::make_absolute_url( $m[3], $_links_add_base )
|
||||
WP_Http::make_absolute_url( $m[3], $_links_add_base )
|
||||
)
|
||||
. $m[2];
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-34122';
|
||||
$wp_version = '4.4-alpha-34123';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue