Author: sevein
Date: Sat Oct 8 17:05:30 2011
New Revision: 9993
Log:
Add some comments and return 501 code if user is trying to use verbs PUT and
DELETE, not implemented yet
Modified:
trunk/plugins/qtSwordPlugin/modules/qtSwordPlugin/actions/depositAction.class.php
Modified:
trunk/plugins/qtSwordPlugin/modules/qtSwordPlugin/actions/depositAction.class.php
==============================================================================
---
trunk/plugins/qtSwordPlugin/modules/qtSwordPlugin/actions/depositAction.class.php
Sat Oct 8 15:43:40 2011 (r9992)
+++
trunk/plugins/qtSwordPlugin/modules/qtSwordPlugin/actions/depositAction.class.php
Sat Oct 8 17:05:30 2011 (r9993)
@@ -21,6 +21,8 @@
{
public function execute($request)
{
+ // TODO: Make possible to return 404 together with a XML document
+ // QubitResourceroute throws 404 exception before this is executed
$this->resource = $this->getRoute()->resource;
if ($request->isMethod('post'))
@@ -61,12 +63,22 @@
return;
}
+
+
// HTTP status code 201: Created
$this->response->setStatusCode('201');
// Location
// $this->response->setHttpHeader('Location', '...');
}
+ else if ($request->isMethod('put') || $request->isMethod('delete'))
+ {
+ // TODO: Editing and deleting resources, not implemented
+ // HTTP status code 501, Not Implemented
+ $this->response->setStatusCode('501');
+
+ return;
+ }
$this->response->setHttpHeader('Content-Type', 'application/atom+xml;
charset="utf-8"');
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.