handle application/json content-type headers with charset info

This diff updates the request handling to better parse the "content-type" header, allowing for values such as `application/json; charset=utf-8` to still be recognized as json requests.