|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-06-12 22:55 UTC] aharvey@php.net
-Assigned To:
+Assigned To: aharvey
[2014-06-13 00:43 UTC] aharvey@php.net
-Status: Assigned
+Status: Closed
[2014-06-13 00:43 UTC] aharvey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 11:00:01 2025 UTC |
Description: ------------ header('Location: foo') overrides the response code if it isn't 201 or 301-307, inclusive. With 308 Permanent Redirect now being added to HTTP 1.1, this is overly restrictive. We should prevent changing the response code for any 3xx response code. Test script: --------------- <?php header('HTTP/1.1 308 Permanent Redirect'); header('Location: http://foo.bar'); ?> Expected result: ---------------- HTTP/1.1 308 Permanent Redirect Host: localhost:8000 Connection: close X-Powered-By: PHP/5.5.13-dev Location: http://foo.bar Content-type: text/html Actual result: -------------- HTTP/1.1 302 Found Host: localhost:8000 Connection: close X-Powered-By: PHP/5.5.13-dev Location: http://foo.bar Content-type: text/html