Nginx ignoring client's HTTP 1.0 request and respond by HTTP 1.1
Posted
by
Yoga
on Server Fault
See other posts from Server Fault
or by Yoga
Published on 2012-10-27T15:16:11Z
Indexed on
2012/10/27
17:03 UTC
Read the original article
Hit count: 295
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
© Server Fault or respective owner