completed an install of centos.. yay
authorpaulr <me@pjr.cc>
Sat, 30 Jul 2011 19:29:40 +0000 (05:29 +1000)
committerpaulr <me@pjr.cc>
Sat, 30 Jul 2011 19:29:40 +0000 (05:29 +1000)
libglcas/web.php
plugins/repo.php
www/.htaccess

index 96d30b1..3327d3d 100644 (file)
@@ -22,6 +22,7 @@ class GLCASWeb {
                
                // 
                $call_class = $urlparser->getClass($url);
+               error_log("urldecode: ".urldecode($url));
                $call_class->go($url);
        }
        
index 5ec7a09..a908f03 100644 (file)
@@ -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");
                }
index e1f7b2e..be7a5ed 100644 (file)
@@ -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]