Check http-prefixed content-* headers

The built-in web server in PHP 5.4 sets the Content-Length and Content-Type
headers in $_SERVER['HTTP_CONTENT_LENGTH'] and $_SERVER['HTTP_CONTENT_TYPE']
rather than $_SERVER['CONTENT_LENGTH'] and $_SERVER['CONTENT_TYPE'].
Merged cwarden's change for http-prefixed content-* headers