Added conditional to use HTTP_CONTENT_TYPE as well as CONTENT_TYPE so POST functionality is preserved when using built-in PHP web server.