Changeset 34123 for trunk/src/wp-includes/class-http.php
- Timestamp:
- 09/14/2015 05:36:37 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-http.php
r33880 r34123 305 305 * @since 3.7.0 306 306 * 307 * @param array $ valueArray of HTTP transports to check. Default array contains308 * 'curl', and 'streams', in that order.309 * @param array $args HTTP request arguments.310 * @param string $url The URL to request.307 * @param array $transports Array of HTTP transports to check. Default array contains 308 * 'curl', and 'streams', in that order. 309 * @param array $args HTTP request arguments. 310 * @param string $url The URL to request. 311 311 */ 312 $request_order = apply_filters( 'http_api_transports', array( 'curl', 'streams' ), $args, $url ); 312 $transports = array( 'curl', 'streams' ); 313 $request_order = apply_filters( 'http_api_transports', $transports, $args, $url ); 313 314 314 315 // Loop over each transport on each HTTP request looking for one which will serve this request's needs. 315 316 foreach ( $request_order as $transport ) { 316 $class = 'WP_HTTP_' . $transport; 317 if ( in_array( $transport, $transports ) ) { 318 $transport = ucfirst( $transport ); 319 } 320 $class = 'WP_Http_' . $transport; 317 321 318 322 // Check to see if this transport is a possibility, calls the transport statically. … … 549 553 foreach ( $r['cookies'] as $name => $value ) { 550 554 if ( ! is_object( $value ) ) 551 $r['cookies'][ $name ] = new WP_H TTP_Cookie( array( 'name' => $name, 'value' => $value ) );555 $r['cookies'][ $name ] = new WP_Http_Cookie( array( 'name' => $name, 'value' => $value ) ); 552 556 } 553 557 … … 737 741 return $maybe_relative_path; 738 742 739 if ( ! $url_parts = WP_H TTP::parse_url( $url ) ) {743 if ( ! $url_parts = WP_Http::parse_url( $url ) ) { 740 744 return $maybe_relative_path; 741 745 } 742 746 743 if ( ! $relative_url_parts = WP_H TTP::parse_url( $maybe_relative_path ) ) {747 if ( ! $relative_url_parts = WP_Http::parse_url( $maybe_relative_path ) ) { 744 748 return $maybe_relative_path; 745 749 } … … 825 829 $redirect_location = array_pop( $redirect_location ); 826 830 827 $redirect_location = WP_H TTP::make_absolute_url( $redirect_location, $url );831 $redirect_location = WP_Http::make_absolute_url( $redirect_location, $url ); 828 832 829 833 // POST requests should not POST to a redirected location.
Note: See TracChangeset
for help on using the changeset viewer.