wez Sat Jul 10 06:54:09 2004 EDT
Modified files:
/php-src/main/streams streams.c
Log:
RIP: greedy ready problems
This allows people to use fread($fp, filesize($filename)) for regular files,
but packet-based non-greedy reads for everything else.
http://cvs.php.net/diff.php/php-src/main/streams/streams.c?r1=1.58&r2=1.59&ty=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.58 php-src/main/streams/streams.c:1.59
--- php-src/main/streams/streams.c:1.58 Tue Jun 29 17:51:53 2004
+++ php-src/main/streams/streams.c Sat Jul 10 06:54:09 2004
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: streams.c,v 1.58 2004/06/29 21:51:53 wez Exp $ */
+/* $Id: streams.c,v 1.59 2004/07/10 10:54:09 wez Exp $ */
#define _GNU_SOURCE
#include "php.h"
@@ -592,7 +592,8 @@
}
/* just break anyway, to avoid greedy read */
- break;
+ if (stream->wrapper != &php_plain_files_wrapper)
+ break;
}
if (didread > 0) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php