Snoopy fread fixes. Props JeremyVisser. fixes #2733

git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-07-23 18:24:15 +00:00
parent 710ac302ea
commit 0ee416e9b8
1 changed files with 11 additions and 9 deletions

View File

@ -78,7 +78,7 @@ class Snoopy
var $error = ""; // error messages sent here
var $response_code = ""; // response code returned from server
var $headers = array(); // headers returned from server sent here
var $maxlength = 500000; // max return data length (body)
var $maxlength = 8192; // max return data length (body)
var $read_timeout = 0; // timeout on read operations, in seconds
// supported only since PHP 4 Beta 4
// set to 0 to disallow timeouts
@ -720,13 +720,13 @@ class Snoopy
chr(176),
chr(39),
chr(128),
"ä",
"ö",
"ü",
"Ä",
"Ö",
"Ü",
"ß",
"<EFBFBD>",
"<EFBFBD>",
"<EFBFBD>",
"<EFBFBD>",
"<EFBFBD>",
"<EFBFBD>",
"<EFBFBD>",
);
$text = preg_replace($search,$replace,$document);
@ -1238,7 +1238,9 @@ class Snoopy
if (!is_readable($file_name)) continue;
$fp = fopen($file_name, "r");
$file_content = fread($fp, filesize($file_name));
while (!feof($fp)) {
$file_content = fread($fp, filesize($file_name));
}
fclose($fp);
$base_name = basename($file_name);