Skip to content
Snippets Groups Projects
Commit e5003907 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

improve body detection of requests in jsonapi, fixes #4764

Closes #4764

Merge request studip/studip!3563
parent bf62a91e
No related branches found
No related tags found
No related merge requests found
......@@ -418,6 +418,8 @@ class JsonApiController
private function doesRequestHaveBody(Request $request): bool
{
return in_array($request->getMethod(), ['POST', 'PATCH']);
return in_array($request->getMethod(), ['POST', 'PATCH'])
&& $request->getBody()->isReadable()
&& $request->getBody()->getSize() > 0;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment