aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework/Http/Request.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/AppFramework/Http/Request.php')
-rw-r--r--lib/private/AppFramework/Http/Request.php14
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php
index 9a7014b36c1..59ee3edd0fe 100644
--- a/lib/private/AppFramework/Http/Request.php
+++ b/lib/private/AppFramework/Http/Request.php
@@ -430,17 +430,9 @@ class Request implements \ArrayAccess, \Countable, IRequest {
}
$params = [];
- // 'application/json' must be decoded manually.
- if (strpos($this->getHeader('Content-Type'), 'application/json') !== false) {
- $params = json_decode(file_get_contents($this->inputStream), true);
- if ($params !== null && \count($params) > 0) {
- $this->items['params'] = $params;
- if ($this->method === 'POST') {
- $this->items['post'] = $params;
- }
- }
- // 'application/scim+json' must be decoded manually.
- } elseif (strpos($this->getHeader('Content-Type'), 'application/scim+json') !== false) {
+ // 'application/json' and 'application/scim+json' must be decoded manually.
+ if (strpos($this->getHeader('Content-Type'), 'application/json') !== false
+ || strpos($this->getHeader('Content-Type'), 'application/scim+json') !== false) {
$params = json_decode(file_get_contents($this->inputStream), true);
if ($params !== null && \count($params) > 0) {
$this->items['params'] = $params;