summaryrefslogtreecommitdiffstats
path: root/lib/api.php
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2012-09-17 12:08:17 +0000
committerTom Needham <needham.thomas@gmail.com>2012-09-17 12:08:17 +0000
commit3ea01df1cdc3fe8774bf7e2d5eb93cc0fe809345 (patch)
tree8c3625cc4ad3fdd48eb9dbc0233b9cbf19f7fe96 /lib/api.php
parent8926038591a2c290580f13cbb5d8581d0f7861e5 (diff)
downloadnextcloud-server-3ea01df1cdc3fe8774bf7e2d5eb93cc0fe809345.tar.gz
nextcloud-server-3ea01df1cdc3fe8774bf7e2d5eb93cc0fe809345.zip
API: Parse PUT and DELETE variables
Diffstat (limited to 'lib/api.php')
-rw-r--r--lib/api.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/api.php b/lib/api.php
index ba6e880261d..29403030233 100644
--- a/lib/api.php
+++ b/lib/api.php
@@ -81,6 +81,12 @@ class OC_API {
* @param array $parameters
*/
public static function call($parameters){
+ // Prepare the request variables
+ if($_SERVER['REQUEST_METHOD'] == 'PUT'){
+ parse_str(file_get_contents("php://input"), $_PUT);
+ } else if($_SERVER['REQUEST_METHOD'] == 'DELETE'){
+ parse_str(file_get_contents("php://input"), $_DELETE);
+ }
$name = $parameters['_route'];
// Loop through registered actions
foreach(self::$actions[$name] as $action){