|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-10-02 09:25 UTC] mike@php.net
-Type: Bug
+Type: Documentation Problem
[2013-10-02 09:25 UTC] mike@php.net
[2013-10-14 10:54 UTC] daverandom@php.net
-Status: Open
+Status: Not a bug
[2013-10-14 10:54 UTC] daverandom@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 21:00:01 2025 UTC |
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); */