Ticket #8622: 8622.debug.diff
File 8622.debug.diff, 1.2 KB (added by , 14 years ago) |
---|
-
wp-includes/http.php
256 262 $transports = WP_Http::_postTransport($r); 257 263 } 258 264 265 if(is_admin()) echo " transports: " . implode(', ', $c = array_map('get_class', $transports)) . "<br>"; 259 266 $response = array( 'headers' => array(), 'body' => '', 'response' => array('code', 'message') ); 260 267 foreach( (array) $transports as $transport ) { 268 if (is_admin()) echo "Requesting $url using " . get_class($transport); 269 $timer_http = timer_start(); 261 270 $response = $transport->request($url, $r); 262 271 if(is_admin()) echo ' took ' . timer_stop(0) . 's'; 263 272 if( !is_wp_error($response) ) 264 273 return $response; 274 if(is_admin()) echo get_class($transport) . ' has failed with error:' . $response->get_error_message() . "<br>"; 265 275 } 266 276 267 277 return $response; … … 971 981 'blocking' => true, 972 982 'headers' => array(), 'body' => null 973 983 ); 974 984 return new wp_error('test', 'test'); 975 985 $r = wp_parse_args( $args, $defaults ); 976 986 977 987 if ( isset($r['headers']['User-Agent']) ) {