Doc #65791 [Opn->Nab]: Mixing header('Status', and other header with int $http_response_code
| From: | daverandom@php.net | Date: | Mon, 14 Oct 2013 10:54:36 +0000 |
| Subject: | Doc #65791 [Opn->Nab]: Mixing header('Status', and other header with int $http_response_code | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-10486@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65791&edit=1
ID: 65791
Updated by: daverandom@php.net
Reported by: rainer-phpbugs at 7val dot com
Summary: Mixing header('Status', and other header with int
$http_response_code
-Status: Open
+Status: Not a bug
Type: Documentation Problem
Package: HTTP related
PHP Version: 5.4.20
Block user comment: N
Private report: N
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Agreed with Mike.
Personally I don't think this is really a problem at all, not even a documentation problem, we
do not need to document features that we do not support or have any influence over.
I'm closing this as expected behaviour, drop me a line if you disagree
Previous Comments:
------------------------------------------------------------------------
[2013-10-02 09:25:16] mike@php.net
"Status:" is just a special CGI header and not handled by PHP at all.
------------------------------------------------------------------------
[2013-09-30 17:20:35] rainer-phpbugs at 7val dot com
Description:
------------
The int $http_response_code for later calls to header() don't update any earlier codes set with
header('Status: ???'). The Documentation claims that it "Forces the HTTP response
code to the specified value". If header('Status: ...') has not been used beforehand,
setting http_response_code works as expected.
Test script:
---------------
<?php
header('Status: 500 Internat Server Error', true, 500);
header('Status: 200 OK', true, 200);
header('WWW-Authenticate: Basic realm="Access"', true, 401);
/* this would work: header('Status: 401 OK', true, 401); */
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65791&edit=1