From 615a21ede991668743f0550bc03e4d1d091cf912 Mon Sep 17 00:00:00 2001 From: Brian Cowan Date: Thu, 28 Jul 2005 20:42:38 +0200 Subject: use fread instead of fpassthru in fetch.php darcs-hash:20050728184238-93e20-0c838d887fb148de48dd01b34afdf3f150e94765.gz --- lib/exe/fetch.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/exe/fetch.php') diff --git a/lib/exe/fetch.php b/lib/exe/fetch.php index 384ff2d32..812850267 100644 --- a/lib/exe/fetch.php +++ b/lib/exe/fetch.php @@ -85,7 +85,12 @@ $fp = @fopen($FILE,"rb"); if($fp){ - fpassthru($fp); //does a close itself + while (!feof($fp)) { + @set_time_limit(); // large files can take a lot of time + print fread($fp, 16*1024); + flush(); + } + fclose($fp); }else{ header("HTTP/1.0 500 Internal Server Error"); print "Could not read $FILE - bad permissions?"; -- cgit v1.2.3