Changeset 8522
- Timestamp:
- 08/01/2008 09:24:03 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/http.php
r8520 r8522 537 537 $url = str_replace($arrURL['scheme'], 'http', $url); 538 538 539 $handle = fopen($url, 'r b');539 $handle = fopen($url, 'r'); 540 540 541 541 if (! $handle) … … 553 553 while ( ! feof($handle) ) 554 554 $strResponse .= fread($handle, 4096); 555 556 fclose($handle);557 555 558 556 $theHeaders = ''; … … 565 563 $processedHeaders = WP_Http::processHeaders($theHeaders); 566 564 565 fclose($handle); 567 566 return array('headers' => $processedHeaders['headers'], 'body' => $strResponse, 'response' => $processedHeaders['response']); 568 567 } … … 636 635 $context = stream_context_create($arrContext); 637 636 638 $handle = fopen($url, 'r b', false, $context);639 640 stream_set_timeout($handle, apply_filters('http_request_stream_timeout', $ this->timeout) );637 $handle = fopen($url, 'r', false, $context); 638 639 stream_set_timeout($handle, apply_filters('http_request_stream_timeout', $r['timeout']) ); 641 640 642 641 if ( ! $handle) … … 748 747 'connecttimeout' => $r['timeout'], 749 748 'redirect' => $r['redirection'], 750 'useragent' => $r['user _agent'],749 'useragent' => $r['user-agent'], 751 750 'headers' => $headers, 752 751 ); … … 850 849 851 850 if ( $r['httpversion'] == '1.0' ) 852 curl_setopt( $h eadle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0 );851 curl_setopt( $handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0 ); 853 852 else 854 curl_setopt( $h eadle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1 );853 curl_setopt( $handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1 ); 855 854 856 855 if ( ! $r['blocking'] ) {
Note: See TracChangeset
for help on using the changeset viewer.