Possible Duplicate:
404 header - HTTP 1.0 or 1.1?
I have a simple PHP code which send 404 using the header
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
echo $_SERVER["SERVER_PROTOCOL"];
But when using the curl
command and force 1.0
, it return..
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 $_SERVER["SERVER_PROTOCOL"]
is 1.0 but header give me 1.1
, what is the reason?