summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormichael pereira2011-04-15 15:27:45 +0200
committermichael pereira2011-04-15 15:27:45 +0200
commit939176362f5d0c9496def6f9d77e34c4db3fe465 (patch)
treeeab0ae6f5abfebbe06ae805bd2cd2adc1f17f43c
parentContent-Length in KCL korrigiert (diff)
downloadpbs2-939176362f5d0c9496def6f9d77e34c4db3fe465.tar.gz
pbs2-939176362f5d0c9496def6f9d77e34c4db3fe465.tar.xz
pbs2-939176362f5d0c9496def6f9d77e34c4db3fe465.zip
#213 404 wird geschickt wenn die resource nicht auf dem server liegt
-rw-r--r--application/controllers/ResourceController.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/application/controllers/ResourceController.php b/application/controllers/ResourceController.php
index 4a3d9fc..f6b63e2 100644
--- a/application/controllers/ResourceController.php
+++ b/application/controllers/ResourceController.php
@@ -16,7 +16,7 @@ class ResourceController extends Zend_Controller_Action
//TODO Error Messages if something failed
$alpha = $this->_request->getParam('alpha');
- if($alpha != ""){
+ if($alpha != "0"){
$alphasessionID = $alpha;
$result = $sm->findBy(array('alphasessionID' => $alphasessionID),true);
# print_a($result);
@@ -74,6 +74,8 @@ class ResourceController extends Zend_Controller_Action
header("Content-Length: ".filesize(getcwd()."/".$initname));
passthru( "cat ".$initname);
+ }else{
+ header('HTTP/1.0 404 Not Found');
}
}
@@ -126,6 +128,8 @@ class ResourceController extends Zend_Controller_Action
chdir("../resources/config/$configID/");
passthru( "cat default.tgz");
}
+ }else{
+ header('HTTP/1.0 404 Not Found');
}
}
@@ -149,7 +153,10 @@ class ResourceController extends Zend_Controller_Action
header("Content-Length: ".filesize(getcwd()."/".$kernelname));
passthru( "cat ". $kernelname);
+ }else{
+ header('HTTP/1.0 404 Not Found');
}
+
}
public function getkclAction()