Bug #65943 [NEW]: Blank headers missing with apache_request_headers

From: Date: Tue, 22 Oct 2013 01:48:25 +0000
Subject: Bug #65943 [NEW]: Blank headers missing with apache_request_headers
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-182374@lists.php.net to get a copy of this message
From:             jgotts at gmail dot com
Operating system: Linux
PHP version:      5.4.21
Package:          Apache related
Bug Type:         Bug
Bug description:Blank headers missing with apache_request_headers

Description:
------------
It appears that apache_request_headers won't return blank headers. The
key for said header is missing from the associative array. We have
something quite simple on the JavaScript side:

var xhr = new XMLHttpRequest();
...
xhr.setRequestHeader('my-header', '');

Nothing in
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
disallows a blank second argument for setRequestHeader().

And on the PHP side, we have:

$headers = apache_request_headers();

$headers['my-header'] is missing! What ate it?


-- 
Edit bug report at https://bugs.php.net/bug.php?id=65943&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=65943&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=65943&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=65943&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=65943&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=65943&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=65943&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=65943&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=65943&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=65943&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=65943&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=65943&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=65943&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=65943&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65943&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=65943&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=65943&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=65943&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65943&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=65943&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=65943&r=mysqlcfg



Thread (2 messages)

« previous php.bugs (#182374) next »