Changeset 8524
- Timestamp:
- 08/01/2008 11:13:48 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/http.php
r8523 r8524 89 89 90 90 if ( is_null($working_transport) ) { 91 if ( true === WP_Http_Streams::test() ) 91 if ( true === WP_Http_ExtHttp::test() ) 92 $working_transport = new WP_Http_ExtHttp(); 93 else if ( true === WP_Http_Curl::test() ) 94 $working_transport = new WP_Http_Curl(); 95 else if ( true === WP_Http_Streams::test() ) 92 96 $working_transport = new WP_Http_Streams(); 93 else if ( true === WP_Http_ExtHttp::test() )94 $working_transport = new WP_Http_ExtHttp();95 97 else if ( true === WP_Http_Fopen::test() ) 96 98 $working_transport = new WP_Http_Fopen(); … … 120 122 121 123 if ( is_null($working_transport) ) { 122 if ( true === WP_Http_Streams::test() ) 124 if ( true === WP_Http_ExtHttp::test() ) 125 $working_transport = new WP_Http_ExtHttp(); 126 else if ( true === WP_Http_Streams::test() ) 123 127 $working_transport = new WP_Http_Streams(); 124 else if ( true === WP_Http_ExtHttp::test() )125 $working_transport = new WP_Http_ExtHttp();126 128 else if ( true === WP_Http_Fsockopen::test() ) 127 129 $working_transport = new WP_Http_Fsockopen(); … … 194 196 $headers['user-agent'] = $r['user-agent']; 195 197 196 if ( is_null($body) || count($headers) > 1)198 if ( is_null($body) ) 197 199 $transport = WP_Http::_getTransport(); 198 200 else 199 201 $transport = WP_Http::_postTransport(); 200 202 201 return $transport->request($url, $ headers, $body, $r);203 return $transport->request($url, $r, $headers, $body); 202 204 } 203 205 … … 219 221 $defaults = array('method' => 'POST'); 220 222 $r = wp_parse_args( $args, $defaults ); 221 return $this->request($url, $ headers, $body, $r);223 return $this->request($url, $r, $headers, $body); 222 224 } 223 225 … … 239 241 $defaults = array('method' => 'GET'); 240 242 $r = wp_parse_args( $args, $defaults ); 241 return $this->request($url, $ headers, $body, $r);243 return $this->request($url, $r, $headers, $body); 242 244 } 243 245 … … 695 697 * @param string $url 696 698 * @param str|array $args Optional. Override the defaults. 697 * @param string|array $headers Optional. Either the header string or array of Header name and value pairs. Expects sanitized.699 * @param array $headers Optional. Either the header string or array of Header name and value pairs. Expects sanitized. 698 700 * @param string $body Optional. The body that should be sent. Expected to be already processed. 699 701 * @return array 'headers', 'body', and 'response' keys. … … 937 939 $objFetchSite = _wp_http_get_object(); 938 940 939 return $objFetchSite->request($url, $ headers, $body, $args);941 return $objFetchSite->request($url, $args, $headers, $body); 940 942 } 941 943 … … 956 958 $objFetchSite = _wp_http_get_object(); 957 959 958 return $objFetchSite->get($url, $ headers, $body, $args);960 return $objFetchSite->get($url, $args, $headers, $body); 959 961 } 960 962 … … 975 977 $objFetchSite = _wp_http_get_object(); 976 978 977 return $objFetchSite->post($url, $ headers, $body, $args);979 return $objFetchSite->post($url, $args, $headers, $body); 978 980 } 979 981 … … 994 996 $objFetchSite = _wp_http_get_object(); 995 997 996 return $objFetchSite->head($url, $ headers, $body, $args);998 return $objFetchSite->head($url, $args, $headers, $body); 997 999 } 998 1000
Note: See TracChangeset
for help on using the changeset viewer.