X-Git-Url: http://git.pjr.cc/?p=glcas.git;a=blobdiff_plain;f=plugins%2Frepo.php;h=a908f03f13f838dbc5633716e79c8021ae342af0;hp=5ec7a09448fd8f3fafe0b0dafd89b12f8a062364;hb=a2a5bfaf87f03c6b1de4d63c488eba76d56d4f7b;hpb=ac6a7aa8e9f814a71f1c759c8ec2c83882cc1240 diff --git a/plugins/repo.php b/plugins/repo.php index 5ec7a09..a908f03 100644 --- a/plugins/repo.php +++ b/plugins/repo.php @@ -291,7 +291,6 @@ class GLCASRepo { header("Content-Length: $fsize"); $sgotten = 0; while(!feof($localfile)) { - error_log("OTHERDOWNLOAD: get"); $data = fread($localfile, 2048); if(!$data) { error_log("dollardata is pair shaped"); @@ -371,7 +370,8 @@ class GLCASRepo { // the problem is here error_log("Downloader: going ranged as other"); clearstatcache(); - $contentlen = file_get_contents($filename.".tmp.data.deleteme.size"); + if(file_exists($filename.".tmp.data.deleteme.size")) $contentlen = file_get_contents($filename.".tmp.data.deleteme.size"); + else $contentlen = filesize($filename); $contenttype = mime_content_type($filename); header("HTTP/1.1 206 Partial Content"); header("Content-Length: $rangelength"); @@ -384,10 +384,6 @@ class GLCASRepo { clearstatcache(); - error_log("OTHERDOWNLOAD: im another downloader, please work for ranged"); - - - error_log("OTHERDOWNLOAD: im another downloader, please work"); // first we wait until the file reaches $rangestart while(filesize("$filename") < $rangestart) { @@ -401,7 +397,7 @@ class GLCASRepo { $sgotten = 0; // need to think about this in pseudo code. // 1. close the file and wait for it to get to $sgotten + 2048 or $fsize - $cursize = filesize($filename.".tmp.data.deleteme"); + $cursize = filesize($filename); $upload_finished = false; @@ -467,7 +463,6 @@ class GLCASRepo { if(file_exists("$WEB_ROOT_FS/../bin/downloadfile.php")) { $scall = "/usr/bin/php $WEB_ROOT_FS/../bin/downloadfile.php '$url' '$file' > /dev/null 2>&1 &"; system($scall); - error_log("started as v, $v, $scall"); } else { error_log("cant find download helper... dieing"); }