Sets HTTP_CONTENT_TYPE but not CONTENT_TYPE
| Bug #66606 | Sets HTTP_CONTENT_TYPE but not CONTENT_TYPE | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2014-01-29 17:40 UTC | Modified: | 2015-08-09 01:02 UTC |
|
||||||||||
| From: | pmjones88 at gmail dot com | Assigned: | cmb (profile) | |||||||||||
| Status: | Closed | Package: | Built-in web server | |||||||||||
| PHP Version: | 5.5.8 | OS: | Mac OS X | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2014-01-29 17:40 UTC] 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.
Patches
Pull Requests
Pull requests:
- Fix #66606: Sets HTTP_CONTENT_TYPE but not CONTENT_TYPE (php-src/886)
- Fix #66606: Sets HTTP_CONTENT_TYPE but not CONTENT_TYPE (php-src/747)
History
AllCommentsChangesGit/SVN commits
[2015-08-08 18:13 UTC] cmb@php.net
-Status: Open +Status: Verified -Assigned To: +Assigned To: cmb
[2015-08-09 00:57 UTC] cmb@php.net
-Status: Verified +Status: Analyzed
[2015-08-09 00:57 UTC] cmb@php.net
[2015-08-09 01:01 UTC] cmb@php.net
-Status: Analyzed +Status: Closed
[2015-08-09 01:02 UTC] cmb@php.net