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:
parent
710ac302ea
commit
0ee416e9b8
|
@ -78,7 +78,7 @@ class Snoopy
|
||||||
var $error = ""; // error messages sent here
|
var $error = ""; // error messages sent here
|
||||||
var $response_code = ""; // response code returned from server
|
var $response_code = ""; // response code returned from server
|
||||||
var $headers = array(); // headers returned from server sent here
|
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
|
var $read_timeout = 0; // timeout on read operations, in seconds
|
||||||
// supported only since PHP 4 Beta 4
|
// supported only since PHP 4 Beta 4
|
||||||
// set to 0 to disallow timeouts
|
// set to 0 to disallow timeouts
|
||||||
|
@ -720,13 +720,13 @@ class Snoopy
|
||||||
chr(176),
|
chr(176),
|
||||||
chr(39),
|
chr(39),
|
||||||
chr(128),
|
chr(128),
|
||||||
"ä",
|
"<EFBFBD>",
|
||||||
"ö",
|
"<EFBFBD>",
|
||||||
"ü",
|
"<EFBFBD>",
|
||||||
"Ä",
|
"<EFBFBD>",
|
||||||
"Ö",
|
"<EFBFBD>",
|
||||||
"Ü",
|
"<EFBFBD>",
|
||||||
"ß",
|
"<EFBFBD>",
|
||||||
);
|
);
|
||||||
|
|
||||||
$text = preg_replace($search,$replace,$document);
|
$text = preg_replace($search,$replace,$document);
|
||||||
|
@ -1238,7 +1238,9 @@ class Snoopy
|
||||||
if (!is_readable($file_name)) continue;
|
if (!is_readable($file_name)) continue;
|
||||||
|
|
||||||
$fp = fopen($file_name, "r");
|
$fp = fopen($file_name, "r");
|
||||||
|
while (!feof($fp)) {
|
||||||
$file_content = fread($fp, filesize($file_name));
|
$file_content = fread($fp, filesize($file_name));
|
||||||
|
}
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
$base_name = basename($file_name);
|
$base_name = basename($file_name);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue