|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37906 headers_list output appears incomplete
Submitted: 2006-06-24 17:04 UTC Modified: 2006-06-24 18:26 UTC
From: mike at brenden dot com Assigned:
Status: Not a bug Package: HTTP related
PHP Version: 5.1.1 OS: linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: mike at brenden dot com
New email:
PHP Version: OS:


 [2006-06-24 17:04 UTC] mike at brenden dot com

header('X-x: yes');
echo '<p>HEADERS FROM MG</p>';


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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-24 17:11 UTC]
What's your SAPI?

Post a tiny but complete reproduce script with output please!
 [2006-06-24 18:00 UTC] mike at brenden dot com
< ?php

  header('X-x: yes');
  echo '<p><b>apache_request_headers in</b></p>';

  echo '<p><b>apache_response_headers out</b></p>';
  echo '<p><b>headers_list out</b></p>';

  echo '<p><b>sapi='. php_sapi_name(). '</b></p>';
? >

apache_request_headers in

Array ( [Host] => [User-Agent] => Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv: Gecko/20060508 Firefox/ [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" }

 [2006-06-24 18:02 UTC] mike at brenden dot com
this lives at
 [2006-06-24 18:08 UTC]
This has been fixed in PHP-5.1.3

You ain't really using PHP-5.1.4 are you?

 [2006-06-24 18:26 UTC] mike at brenden dot com
ah, you know, thaaat might explain much weirdness.  thank you for looking and for sanity (insanity?) check.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 15 01:01:29 2024 UTC