|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #61439 POST and other methods input data handling
Submitted: 2012-03-19 17:36 UTC Modified: 2015-04-13 16:27 UTC
From: martin dot koranda at gmail dot com Assigned:
Status: Duplicate Package: *General Issues
PHP Version: 5.4.0 OS: *
Private report: No CVE-ID: None
 [2012-03-19 17:36 UTC] martin dot koranda at gmail dot com
when sending multipart/form-data via a POST method, PHP internally parses all 
variables into $_POST and files into $_FILES. but the parsing is not done with any 
other method (PUT,PATCH,PROPFIND ..)

additionally, sending POST with multipart/form-data makes php://input unavailable.

so there is no universal parsing solution which covers all methods.

there should be a setting option (php.ini) where i can determine which particular 
methods i want the internal parser run for (eg.  "parse_input_methods = 

and/or there should be an option for disabling that internal parser completely.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-20 09:01 UTC]
I second that. Actually I've sitting an unfinished proposal in my Inbox' Drafts 
which addresses this issue.

BUT, I'm not thinking about php.ini, but SAPI code shouldn't care about the 
request method, but the request body's content type. And there should be an API 
to register content-type handlers.
 [2012-03-20 09:01 UTC]
-Operating System: windows +Operating System: *
 [2012-03-20 15:14 UTC] martin dot koranda at gmail dot com
mike:   yes that's better, parse it regarding on the request content type. it 
should be also good if it could automatically parse json or xml input, but main is 
the multipart.
do you think you can push your proposal to some of the next builds?
 [2015-04-13 16:27 UTC]
-Status: Open +Status: Duplicate
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Nov 19 10:01:34 2019 UTC