Nginx ignoring client's HTTP 1.0 request and respond by HTTP 1.1
- by Yoga
I am testing using nginx/php5-fpm, with the code
<?php
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
// also tested: header("Status: 404 Not Found");
echo $_SERVER["SERVER_PROTOCOL"];
And force to use HTTP 1.0 with the curl command.
curl -0 -v 'http://www.example.com/test.php'
> GET /test.php HTTP/1.0
< HTTP/1.1 404 Not Found
< Server: nginx
< Date: Sat, 27 Oct 2012 08:51:27 GMT
< Content-Type: text/html
< Connection: close
<
* Closing connection #0
HTTP/1.0
As you can see I am already requesting using HTTP 1.0, but nginx reply me with HTTP 1.1