title: Sending correct HTTP 404 header using PHP
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2769371/404-header-http-1-0-or-1-1">404 header - HTTP 1.0 or 1.1?</a>  </p>
  </blockquote>
  
  
  
  <p>I have a simple PHP code which send 404 using the <code>header</code></p>
  
  <pre><code>header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found"); 
  echo $_SERVER["SERVER_PROTOCOL"];
  </code></pre>
  
  <p>But when using the <code>curl</code> command and force <code>1.0</code>, it return..</p>
  
  <pre><code>curl -0 -v 'http://www.example.com/test.php'
  
  
  &gt; GET /test.php HTTP/1.0
  
  &lt; HTTP/1.1 404 Not Found
  &lt; Server: nginx
  &lt; Date: Sat, 27 Oct 2012 08:51:27 GMT
  &lt; Content-Type: text/html
  &lt; Connection: close
  &lt; 
  * Closing connection #0
  HTTP/1.0
  </code></pre>
  
  <p>As you can see <code>$_SERVER["SERVER_PROTOCOL"]</code> is 1.0 but header give me <code>1.1</code>, what is the reason?</p>