Extract PUT data as POST params
authorRobert Sesek <rsesek@bluestatic.org>
Sun, 14 Aug 2011 17:00:18 +0000 (13:00 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Sun, 14 Aug 2011 17:00:18 +0000 (13:00 -0400)
http/root_controller.php

index 85a7174d7e37292c37a4b41b7b87ae4d6ad08c6d..51b69401be5938ea76d27e898ac9d237cdbd5a36 100644 (file)
@@ -104,6 +104,10 @@ class RootController
     $this->request->url = $url;
     $this->request->http_method = $this->request->data['_SERVER']['REQUEST_METHOD'];
 
+    // Extract any PUT data as POST params.
+    if ($this->request->http_method == 'PUT')
+      parse_str(file_get_contents('php://input'), $this->request->data['_POST']);
+
     $this->delegate->OnInitialRequest($this->request, $this->response);
 
     // Dispatch the request to an Action.