Bug #66606 [Opn->Ver]: Sets HTTP_CONTENT_TYPE but not CONTENT_TYPE
Edit report at https://bugs.php.net/bug.php?id=66606&edit=1
ID: 66606
Updated by: cmb@php.net
Reported by: pmjones88 at gmail dot com
Summary: Sets HTTP_CONTENT_TYPE but not CONTENT_TYPE
-Status: Open
+Status: Verified
Type: Bug
Package: Built-in web server
Operating System: Mac OS X
PHP Version: 5.5.8
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2014-01-29 17:40:46] pmjones88 at gmail dot com
Description:
------------
The CGI RFC at https://tools.ietf.org/rfc/rfc3875.txt specifies
that the Content-Type header value should be stored in CONTENT_TYPE, but the built-in web server
stores it in $_SERVER['HTTP_CONTENT_TYPE'] and does not create a
$_SERVER['CONTENT_TYPE'] key. (This probably affects CONTENT_LENGTH as well.)
Test script:
---------------
// put this in an index file and un the PHP web server against it,
// then issue curl -H "Content-Type: application/json" http://localhost:8000`
// and see that there is no CONTENT_TYPE key, only HTTP_CONTENT_TYPE.
var_dump($_SERVER)
Expected result:
----------------
Expected to see a CONTENT_TYPE key.
Actual result:
--------------
Saw only HTTP_CONTENT_TYPE key.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66606&edit=1
Thread (5 messages)