summaryrefslogtreecommitdiff
path: root/lib/exe/fetch.php
diff options
context:
space:
mode:
authorBrian Cowan <brian.cowan@reed.edu>2005-07-28 20:42:38 +0200
committerBrian Cowan <brian.cowan@reed.edu>2005-07-28 20:42:38 +0200
commit615a21ede991668743f0550bc03e4d1d091cf912 (patch)
tree31fc27c2a3a8e20e98584f62c0492709aa1da63e /lib/exe/fetch.php
parent1bf7859f4a7ca4b94dafd716a8784d59ffe99a35 (diff)
downloadrpg-615a21ede991668743f0550bc03e4d1d091cf912.tar.gz
rpg-615a21ede991668743f0550bc03e4d1d091cf912.tar.bz2
use fread instead of fpassthru in fetch.php
darcs-hash:20050728184238-93e20-0c838d887fb148de48dd01b34afdf3f150e94765.gz
Diffstat (limited to 'lib/exe/fetch.php')
-rw-r--r--lib/exe/fetch.php7
1 files changed, 6 insertions, 1 deletions
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?";