Skip to content

Commit ccecc3c

Browse files
authored
Merge pull request #232 from Poky85/fix-content-type-header
Fix Standard Server PSR request parsing
2 parents 7310b25 + dca2091 commit ccecc3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Server/Helper.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -482,9 +482,9 @@ public function parsePsrRequest(ServerRequestInterface $request)
482482
throw new RequestError('Missing "Content-Type" header');
483483
}
484484

485-
if (stripos('application/graphql', $contentType[0]) !== false) {
485+
if (stripos($contentType[0], 'application/graphql') !== false) {
486486
$bodyParams = ['query' => $request->getBody()->getContents()];
487-
} else if (stripos('application/json', $contentType[0]) !== false) {
487+
} else if (stripos($contentType[0], 'application/json') !== false) {
488488
$bodyParams = $request->getParsedBody();
489489

490490
if (null === $bodyParams) {

0 commit comments

Comments
 (0)