Skip to content

Commit

Permalink
Merge pull request #27 from GoIntegro/bugfix/content-type
Browse files Browse the repository at this point in the history
Fix "content-type" comparison because Firefox adds charset:utf-8 to the "content-type"
  • Loading branch information
mdelrosso committed Jun 19, 2015
2 parents fdba4b8 + 842fa11 commit 4799794
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion JsonApi/Request/BodyParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,9 @@ protected function prepareData(
*/
private function isJsonApi(Request $request)
{
$ctype = explode(';', $request->headers->get('CONTENT_TYPE'));

return JsonApiSpec::HATEOAS_CONTENT_TYPE
=== $request->headers->get('CONTENT_TYPE');
=== $ctype[0];
}
}

0 comments on commit 4799794

Please sign in to comment.