Doc #55684 [Opn->Csd]: Example #1 header_register_callback
| From: | rquadling@php.net | Date: | Tue, 13 Sep 2011 15:09:06 +0000 |
| Subject: | Doc #55684 [Opn->Csd]: Example #1 header_register_callback | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-7180@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55684&edit=1
ID: 55684
Updated by: rquadling@php.net
Reported by: gwarnants at gmail dot com
Summary: Example #1 header_register_callback
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
-Assigned To:
+Assigned To: rquadling
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Revision: http://svn.php.net/viewvc/?view=revision&revision=316649
Log: Rename file. Fix bug #55679
Previous Comments:
------------------------------------------------------------------------
[2011-09-13 14:13:15] gwarnants at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.header-register-callback%23Examples
---
Example #1 is testing the availability of header "X-Powered" before removing
"X-Powered-By" header, which is not completely safe.
Expected result:
----------------
if (strpos($header, 'X-Powered-By') === 0) {
header_remove('X-Powered-By');
}
Actual result:
--------------
if (strpos($header, 'X-Powered') !== false) {
header_remove('X-Powered-By');
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55684&edit=1