On Tue, Sep 2, 2008 at 2:22 PM, Dmitry Stogov <[EMAIL PROTECTED]> wrote: > dmitry Tue Sep 2 13:22:16 2008 UTC > > Added files: (Branch: PHP_5_3) > /php-src/sapi/cgi/tests 010.phpt > > Modified files: > /php-src/sapi/cgi cgi_main.c > Log: > Fixed bug #45860 (header() function fails to correctly replace all Status > lines) > >
Hello, I was checking the same issue a bit myself and noticed one edge case where this fix might be slightly unintuitive: # cat test.php <?php header("HTTP/1.1 404 Not found"); header("Status: 403 Forbidden"); ?> # /opt/php/branches/5_3/bin/php-cgi test.php Status: 404 Not found X-Powered-By: PHP/5.3.0alpha3-dev Content-type: text/html # cat test2.php <?php header("HTTP/1.1 404 Not Found"); header("HTTP/1.1 403 Forbidden"); ?> # /opt/php/branches/5_3/bin/php-cgi test2.php Status: 403 Forbidden X-Powered-By: PHP/5.3.0alpha3-dev Content-type: text/html The question in here is: Should explicit Status: header override the status code and message given in HTTP/ header? -- Mikko Koppanen -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php