diff --git a/lib/route.php b/lib/route.php
index 0d3339add6cfd3500bfe05de5d8cc15613778aee..df3a18e844f3ec8927104c5512fee1afe1950d70 100644
--- a/lib/route.php
+++ b/lib/route.php
@@ -10,27 +10,27 @@ use Symfony\Component\Routing\Route;
 
 class OC_Route extends Route {
 	public function method($method) {
-		$this->setRequirement('_method', $method);
+		$this->setRequirement('_method', strtoupper($method));
 		return $this;
 	}
 
 	public function post() {
-		$this->method('post');
+		$this->method('POST');
 		return $this;
 	}
 
 	public function get() {
-		$this->method('get');
+		$this->method('GET');
 		return $this;
 	}
 
 	public function put() {
-		$this->method('put');
+		$this->method('PUT');
 		return $this;
 	}
 
 	public function delete() {
-		$this->method('delete');
+		$this->method('DELETE');
 		return $this;
 	}
 
diff --git a/lib/router.php b/lib/router.php
index f76f64ac82ba6a1b2eaceb17de636b71e63ab940..c3864cfc91c5749ec1b19f67f492461e762cd705 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -51,7 +51,7 @@ class OC_Router {
 		if (isset($parameters['action'])) {
 			$action = $parameters['action'];
 			if (!is_callable($action)) {
-			var_dump($action);
+				var_dump($action);
 				throw new Exception('not a callable action');
 			}
 			unset($parameters['action']);