Req #65917 [NEW]: getallheaders() is not supported by the built-in web server
From: ajf at ajf dot me
Operating system: Windows, Linux
PHP version: 5.4.20
Package: Built-in web server
Bug Type: Feature/Change Request
Bug description:getallheaders() is not supported by the built-in web server
Description:
------------
The built-in CLI web server does not support getallheaders(). Given that
projects may need to support headers unavailable in $_SERVER and that
both Apache and FastCGI support it, it is unfortunate that the CLI web
server does not.
I expect this would not be difficult to implement, considering that the
CLI web server likely already has this information at its disposal.
Test script:
---------------
<?php
// The header() is just so that var_dump()'s output looks good in
browser
// I'm aware that getallheaders() gets *request* headers
header('Content-Type: text/plain');
var_dump(getallheaders());
Expected result:
----------------
array(0) {
...
}
Actual result:
--------------
<br />
<b>Fatal error</b>: Call to undefined function getallheaders() in
<b>D:\Projects\test.php</b> on line <b>3</b><br />
--
Edit bug report at https://bugs.php.net/bug.php?id=65917&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65917&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=65917&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65917&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=65917&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=65917&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65917&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=65917&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=65917&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=65917&r=support
Expected behavior: https://bugs.php.net/fix.php?id=65917&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=65917&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=65917&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=65917&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65917&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=65917&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=65917&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=65917&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65917&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65917&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=65917&r=mysqlcfg
Thread (3 messages)
- ajf at ajf dot me