diff options
Diffstat (limited to 'inc/Remote/JsonRpcServer.php')
-rw-r--r-- | inc/Remote/JsonRpcServer.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/inc/Remote/JsonRpcServer.php b/inc/Remote/JsonRpcServer.php index 40af30c09..f38bf190b 100644 --- a/inc/Remote/JsonRpcServer.php +++ b/inc/Remote/JsonRpcServer.php @@ -44,7 +44,9 @@ class JsonRpcServer header('Allow: POST'); throw new RemoteException("JSON-RPC server only accepts POST requests.", -32606); } - if ($INPUT->server->str('CONTENT_TYPE') !== 'application/json') { + [$contentType] = explode(';', $INPUT->server->str('CONTENT_TYPE'), 2); // ignore charset + $contentType = strtolower($contentType); // mime types are case-insensitive + if ($contentType !== 'application/json') { http_status(415); throw new RemoteException("JSON-RPC server only accepts application/json requests.", -32606); } |