Snoopy fread fixes. Props JeremyVisser. fixes #2733
git-svn-id: https://develop.svn.wordpress.org/trunk@4030 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
89d8708cb1
commit
0932127dbc
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue