Skip to content

Commit

Permalink
Handle content-type with charset.
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed Nov 27, 2010
1 parent d7ef0b9 commit d121aa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/class.route.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ static function _handle_json_encoded_data() {
return FALSE;
}
$content_type = (string) $_SERVER['CONTENT_TYPE'];
if (preg_match('~/json$~', $content_type) <= 0) {
if (preg_match('~/json($|\\s*;)~', $content_type) <= 0) {
return FALSE;
}
$json_data = file_get_contents("php://input");
Expand Down

0 comments on commit d121aa8

Please sign in to comment.