diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2022-12-20 08:58:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-20 08:58:33 +0100 |
commit | 0af4e9d4fe80ad3cffc6f3ff6a3d19d5f808cba9 (patch) | |
tree | b91084689580200f48e77f50d0d2b7efae0c893f /lib/private/AppFramework/Http | |
parent | fcf5789916e914613addd7d7fe32cf50bfd614ae (diff) | |
parent | 7dcd6eb561f4bba7ed36ce1178c725278dd9b80e (diff) | |
download | nextcloud-server-0af4e9d4fe80ad3cffc6f3ff6a3d19d5f808cba9.tar.gz nextcloud-server-0af4e9d4fe80ad3cffc6f3ff6a3d19d5f808cba9.zip |
Merge pull request #34172 from audriga/add-scim-json-support
Add support for application/scim+json
Diffstat (limited to 'lib/private/AppFramework/Http')
-rw-r--r-- | lib/private/AppFramework/Http/Request.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php index 32cce8a88e1..d8aac063f3e 100644 --- a/lib/private/AppFramework/Http/Request.php +++ b/lib/private/AppFramework/Http/Request.php @@ -26,6 +26,7 @@ declare(strict_types=1); * @author Thomas Tanghus <thomas@tanghus.net> * @author Vincent Petry <vincent@nextcloud.com> * @author Simon Leiner <simon@leiner.me> + * @author Stanimir Bozhilov <stanimir@audriga.com> * * @license AGPL-3.0 * @@ -419,8 +420,8 @@ class Request implements \ArrayAccess, \Countable, IRequest { } $params = []; - // 'application/json' must be decoded manually. - if (strpos($this->getHeader('Content-Type'), 'application/json') !== false) { + // 'application/json' and other JSON-related content types must be decoded manually. + if (preg_match(self::JSON_CONTENT_TYPE_REGEX, $this->getHeader('Content-Type')) === 1) { $params = json_decode(file_get_contents($this->inputStream), true); if (\is_array($params) && \count($params) > 0) { $this->items['params'] = $params; |