From a2a5bfaf87f03c6b1de4d63c488eba76d56d4f7b Mon Sep 17 00:00:00 2001 From: paulr Date: Sun, 31 Jul 2011 05:29:40 +1000 Subject: [PATCH] completed an install of centos.. yay --- libglcas/web.php | 1 + plugins/repo.php | 11 +++-------- www/.htaccess | 6 +++--- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/libglcas/web.php b/libglcas/web.php index 96d30b1..3327d3d 100644 --- a/libglcas/web.php +++ b/libglcas/web.php @@ -22,6 +22,7 @@ class GLCASWeb { // $call_class = $urlparser->getClass($url); + error_log("urldecode: ".urldecode($url)); $call_class->go($url); } 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"); } diff --git a/www/.htaccess b/www/.htaccess index e1f7b2e..be7a5ed 100644 --- a/www/.htaccess +++ b/www/.htaccess @@ -1,8 +1,8 @@ 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] -- 1.7.0.4