Ticket #13841: 13841.2.diff
File 13841.2.diff, 851 bytes (added by , 14 years ago) |
---|
-
wp-includes/class-http.php
748 748 } 749 749 750 750 $strResponse = ''; 751 while ( ! feof($handle) ) 751 while ( ! feof($handle) ) { 752 $info = stream_get_meta_data($handle); 753 if ( $info['timed_out'] ) 754 return new WP_Error('http_request_failed', __('Request timed out.')); 752 755 $strResponse .= fread($handle, 4096); 756 } 753 757 754 758 fclose($handle); 755 759 … … 1055 1059 if ( ! empty($r['body'] ) ) 1056 1060 $arrContext['http']['content'] = $r['body']; 1057 1061 1062 // timeouts with stream_contect_create for some reason need to be half of what you expect 1063 $arrContext['http']['timeout'] = $r['timeout'] / 2; 1064 1058 1065 $context = stream_context_create($arrContext); 1059 1066 1060 1067 if ( !WP_DEBUG )