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");
// 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");
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) {
$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;
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");
}
RewriteEngine on
RewriteBase /src/eclipse-workspace/glcas/www/
-RewriteRule ^index\.php.* - [L]
-RewriteRule ^soap\.php.* - [L]
+RewriteRule ^index\.php.* - [L,B]
+RewriteRule ^soap\.php.* - [L,B]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
-RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
+RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,B]