Re: cvs: php-src(PHP_5_3) /sapi/cgi cgi_main.c /sapi/cgi/tests 010.phpt
| From: | Mikko Koppanen | Date: | Tue, 02 Sep 2008 18:00:39 +0000 |
| Subject: | Re: cvs: php-src(PHP_5_3) /sapi/cgi cgi_main.c /sapi/cgi/tests 010.phpt | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-52906@lists.php.net to get a copy of this message | ||
On Tue, Sep 2, 2008 at 2:22 PM, Dmitry Stogov <dmitry@php.net> 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