Changeset 10117
- Timestamp:
- 12/07/2008 08:30:59 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/http.php
r10087 r10117 397 397 // The body is not chunked encoding or is malformed. 398 398 if ( ! preg_match( '/^[0-9a-f]+(\s|\n)+/mi', trim($body) ) ) 399 return false;399 return $body; 400 400 401 401 $parsedBody = ''; … … 673 673 $meta = stream_get_meta_data($handle); 674 674 $theHeaders = $meta['wrapper_data']; 675 if( isset( $meta['wrapper_data']['headers'] ) ) 676 $theHeaders = $meta['wrapper_data']['headers']; 675 677 } else { 678 if( ! isset( $http_response_header ) ) 679 global $http_response_header; 676 680 $theHeaders = $http_response_header; 677 681 } … … 794 798 $strResponse = stream_get_contents($handle); 795 799 $meta = stream_get_meta_data($handle); 796 $processedHeaders = WP_Http::processHeaders($meta['wrapper_data']); 800 801 $processedHeaders = array(); 802 if( isset( $meta['wrapper_data']['headers'] ) ) 803 $processedHeaders = WP_Http::processHeaders($meta['wrapper_data']['headers']); 804 else 805 $processedHeaders = WP_Http::processHeaders($meta['wrapper_data']); 797 806 798 807 if ( ! empty( $strResponse ) && isset( $processedHeaders['headers']['transfer-encoding'] ) && 'chunked' == $processedHeaders['headers']['transfer-encoding'] ) … … 1032 1041 if ( in_array( curl_getinfo( $handle, CURLINFO_HTTP_CODE ), array(301, 302) ) ) 1033 1042 return new WP_Error('http_request_failed', __('Too many redirects.')); 1034 1043 1035 1044 $theHeaders = array( 'headers' => array() ); 1036 1045 $theBody = '';
Note: See TracChangeset
for help on using the changeset viewer.