php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #60600 $HTTP_RAW_POST_DATA is always populated
Submitted: 2011-12-23 11:23 UTC Modified: 2014-03-27 16:01 UTC
Votes:2
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: ercoli at gmail dot com Assigned: mike (profile)
Status: Closed Package: PHP options/info functions
PHP Version: 5.3.8 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
46 + 9 = ?
Subscribe to this entry?

 
 [2011-12-23 11:23 UTC] ercoli at gmail dot com
Description:
------------
$HTTP_RAW_POST_DATA is always populated when data is posted with content-type 
'text/xml' or 'application/xml' (and enctype != "multipart/form-data" ) , even if 
the directive 'always_populate_raw_post_data' is set to Off.

The manual says "the variable is populated only with unrecognized MIME type of the 
data", but as far as I can discern, 'text/xml' and 'application/xml' are both 
recognized mime type.

The preferred method for accessing the xml POST data is php://input since we can 
use a streaming parser with low memory footprint.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-12-24 13:49 UTC] cataphract@php.net
Your interpretation of "recognized MIME type" is off (only "application/x-www-form-urlencoded" and "multipart/form-data" are "recogized" in this sense) and your last sentence is also inaccurate (using php://input doesn't prevent the data from being loaded into memory; either it's already completely present in memory or otherwise it's not and it's the only the way to access the HTTP entity anyway).

But in any case, the documentation is poor in this matter.

Thanks
 [2011-12-24 13:49 UTC] cataphract@php.net
-Type: Bug +Type: Documentation Problem
 [2014-02-01 11:54 UTC] krakjoe@php.net
-Assigned To: +Assigned To: mike
 [2014-02-01 11:54 UTC] krakjoe@php.net
Due to recently merged RFC'd patches, this should be looked at in the context of current versions of PHP.

So assigning to someone useful ...

Noteworthy, the report is originally made for an unsupported, outdated version of PHP, and is not a security issue. If whatever response you get from the assigned person is not satisfactory, please consider making the bug report using a supported, stable version of PHP.

Thanks for taking the time to make PHP better :)
 [2014-03-27 16:01 UTC] mike@php.net
-Status: Assigned +Status: Closed
 [2014-03-27 16:01 UTC] mike@php.net
You can set always populate_raw_post_data to -1 in PHP-5.6
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 17:01:31 2024 UTC