Ticket #16978: 16978.patch
File 16978.patch, 1.2 KB (added by , 14 years ago) |
---|
-
wp-includes/class-http.php
218 218 * @return array|object Array containing 'headers', 'body', 'response', 'cookies'. A WP_Error instance upon error 219 219 */ 220 220 private function _dispatch_request($url, $args) { 221 static $transports = null; 222 if ( is_null($transports) ) 223 $transports = array(); 221 static $transports = array(); 224 222 225 $request_order = isset($r['blocking']) && !$r['blocking'] ? 226 array('curl', 'streams', 'fsockopen', 'exthttp') : // non-blocking order 227 array('exthttp', 'curl', 'streams', 'fsockopen'); // blocking order 223 // default transports order 224 $request_order = $args['blocking'] ? 225 array( 'exthttp', 'curl', 'streams', 'fsockopen' ): // blocking order 226 array( 'curl', 'streams', 'fsockopen', 'exthttp' ); // non-blocking order 228 227 228 $request_order = apply_filters( 'http_get_transports', $request_order, $url, $args ); 229 229 230 // Loop over each transport on each HTTP request looking for one which will serve this requests needs 230 231 foreach ( $request_order as $transport ) { 231 232 $class = 'WP_HTTP_' . $transport;