ID: 37906
User updated by: mike at brenden dot com
Reported By: mike at brenden dot com
-Status: Feedback
+Status: Open
Bug Type: HTTP related
Operating System: linux
PHP Version: 5.1.4
New Comment:
< ?php
header('X-x: yes');
$hdrs=apache_request_headers();
echo '<p><b>apache_request_headers in</b></p>';
print_r($hdrs);
$ho=apache_response_headers();
echo '<p><b>apache_response_headers out</b></p>';
print_r($ho);
echo '<p><b>headers_list out</b></p>';
var_dump(headers_list());
echo '<p><b>sapi='. php_sapi_name(). '</b></p>';
? >
apache_request_headers in
Array ( [Host] => pics.brenden.com [User-Agent] => Mozilla/5.0
(Windows; U; Windows NT 5.0; en-US; rv:1.8.0.4) Gecko/20060508
Firefox/1.5.0.4 [Accept] =>
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
[Accept-Language] => en-us,en;q=0.5 [Accept-Encoding] => gzip,deflate
[Accept-Charset] => ISO-8859-1,utf-8;q=0.7,*;q=0.7 [Keep-Alive] => 300
[Connection] => keep-alive [Cookie] =>
picss=d55dd48565ebbc0d0fdb74d527413a34 )
apache_response_headers out
Array ( [X-x] => yes )
headers_list out
array(2) { [0]=> string(3) "X-x" [1]=> string(12) "Content-type" }
sapi=apache2handler
Previous Comments:
------------------------------------------------------------------------
[2006-06-24 17:11:44] [EMAIL PROTECTED]
What's your SAPI?
Post a tiny but complete reproduce script with output please!
------------------------------------------------------------------------
[2006-06-24 17:04:15] mike at brenden dot com
Description:
------------
startphp:
header('X-x: yes');
$ho=apache_response_headers();
echo '<p>HEADERS FROM MG</p>';
print_r($ho);
var_dump(headers_list());
:endphp
output from headers_list() shows only numeric indices and header-item
name; it does not also show the header-item value (example: [0] element
containts only 'X-x' but does not also contain colon, space and 'yes')
meanwhile, apache_response_headers() works as described.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37906&edit=1