summaryrefslogtreecommitdiff
path: root/modules/rest
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-12-23 13:13:03 -0800
committerTim Almdal <tnalmdal@shaw.ca>2009-12-23 13:13:03 -0800
commitd0dd6650bea15a30a2da66f996980a269a5f9c44 (patch)
tree5c0b8e9c30f6a7435f00dea9c4de04bfe31d8b33 /modules/rest
parentd622d1aa4f3b7c844de2f29cca2e04d9bb56bb86 (diff)
When normalizing the rest request don't assume that the additional arguments are acutall a path. Leave it up to the handler to determine.
Diffstat (limited to 'modules/rest')
-rw-r--r--modules/rest/controllers/rest.php2
-rw-r--r--modules/rest/tests/Rest_Controller_Test.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/rest/controllers/rest.php b/modules/rest/controllers/rest.php
index 4d476a0d..1289d62b 100644
--- a/modules/rest/controllers/rest.php
+++ b/modules/rest/controllers/rest.php
@@ -83,7 +83,7 @@ class Rest_Controller extends Controller {
$request->method = strtolower($this->input->server("HTTP_X_GALLERY_REQUEST_METHOD", $method));
$request->access_token = $this->input->server("HTTP_X_GALLERY_REQUEST_KEY");
- $request->path = implode("/", $args);
+ $request->arguments = $args; // Let the rest handler figure out what the arguments mean
return $request;
}
diff --git a/modules/rest/tests/Rest_Controller_Test.php b/modules/rest/tests/Rest_Controller_Test.php
index 39e79a81..b7fbd5a3 100644
--- a/modules/rest/tests/Rest_Controller_Test.php
+++ b/modules/rest/tests/Rest_Controller_Test.php
@@ -173,7 +173,7 @@ class rest_rest {
static function get($request) {
self::$request = $request;
$item = ORM::factory("item")
- ->where("relative_url_cache", $request->path)
+ ->where("relative_url_cache", implode("/", $request->arguments))
->find();
$response["path"] = $item->relative_url();
$response["title"] = $item->title;