Adds check for "http_content_type" in request as well

Depending on the server you have either
$_SERVER["content_type"] or
$_SERVER["http_content_type"]. So we have to check both.