Ticket #4137: 4137-functions.patch
File 4137-functions.patch, 878 bytes (added by , 17 years ago) |
---|
-
wp-includes/functions.php
662 662 } 663 663 664 664 function wp_remote_fopen( $uri ) { 665 $timeout = 10; 665 $bytes_limit = 30720; /* limit on size of source documen bytes, see 666 * Errata for pingback specification. 667 * http://www.hixie.ch/specs/pingback/pingback 668 */ 669 $timeout = 10; 666 670 $parsed_url = @parse_url($uri); 667 671 668 672 if ( !$parsed_url || !is_array($parsed_url) ) … … 678 682 679 683 //stream_set_timeout($fp, $timeout); // Requires php 4.3 680 684 $linea = ''; 681 while( $remote_read = fread($fp, 4096) ) 685 $bytes = 0; 686 while( $remote_read = fread($fp, 4096) && $bytes < $bytes_limit ) 687 $bytes = $bytes + 4096; 682 688 $linea .= $remote_read; 683 689 fclose($fp); 684 690 return $linea;