note 118253 added to function.http-response-code
| From: | ThomasA.P. | Date: | Tue, 03 Nov 2015 12:46:20 +0000 |
| Subject: | note 118253 added to function.http-response-code | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-204079@lists.php.net to get a copy of this message | ||
When setting the response code to non-standard ones like 420, Apache outputs 500 Internal Server
Error.
This happens when using header(0,0,420) and http_response_code(420).
Use header('HTTP/1.1 420 Enhance Your Calm') instead.
Note that the response code in the string IS interpreted and used in the access log and output via
http_response_code().
----
Server IP: 72.52.91.14
Probable Submitter: 90.184.169.23
----
Manual Page -- http://php.net/manual/en/function.http-response-code.php
Edit -- https://master.php.net/note/edit/118253
Del: integrated -- https://master.php.net/note/delete/118253/integrated
Del: useless -- https://master.php.net/note/delete/118253/useless
Del: bad code -- https://master.php.net/note/delete/118253/bad+code
Del: spam -- https://master.php.net/note/delete/118253/spam
Del: non-english -- https://master.php.net/note/delete/118253/non-english
Del: in docs -- https://master.php.net/note/delete/118253/in+docs
Del: other reasons-- https://master.php.net/note/delete/118253
Reject -- https://master.php.net/note/reject/118253
Search -- https://master.php.net/manage/user-notes.php