Req #41191 [Opn->Csd]: Request for method to always retrieve POST body
| From: | rasmus@php.net | Date: | Tue, 07 Feb 2012 16:05:05 +0000 |
| Subject: | Req #41191 [Opn->Csd]: Request for method to always retrieve POST body | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-167265@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=41191&edit=1
ID: 41191
Updated by: rasmus@php.net
Reported by: jfrim at idirect dot com
Summary: Request for method to always retrieve POST body
-Status: Open
+Status: Closed
Type: Feature/Change Request
Package: HTTP related
Operating System: Win98
PHP Version: 5.2.1
-Assigned To:
+Assigned To: rasmus
Block user comment: N
Private report: N
New Comment:
This was actually addressed in PHP 5.4 with the "enable_post_data_reading" ini
switch.
Previous Comments:
------------------------------------------------------------------------
[2012-02-07 09:10:45] jfrim at idirect dot com
!!!!!!!!!!!!!!!!!
Almost 5 years later, and this still hasn't been resolved!??
Normally I'd be civil about this, but really, Really, REALLY, what's going on in the PHP
development world? This is pathetic.
------------------------------------------------------------------------
[2012-02-07 09:02:04] peter dot e dot lind at gmail dot com
This is still quite a bother:
When you send a POST request of type multipart/form-data, the POST data is parsed
no matter what and you have no chance to check the request body. If the POST
request is invalid somehow (for instance, if the boundary is set wrong) the
parser throws away the entire request body leaving you in the dark as to why
there's no data coming through. Essentially, you are left with "The request is
invalid somehow, but I have no clue as to why" - and if you cannot reproduce the
error yourself, you're completely screwed.
------------------------------------------------------------------------
[2011-01-18 11:01:06] novikov at doroga dot tv
When the Java MIDP client sends wrong multipart/form-data message because of wrong Java
implementation, I don't have a chance to fix the problem on the server side using PHP, just
because I don't have any way to get a raw POST data.
------------------------------------------------------------------------
[2007-04-25 20:12:36] jfrim at idirect dot com
Description:
------------
Currently there exists no way in PHP to retrieve the POST body when a form is sent using
multipart/form-data. This is a problem for implementing protocols like HTTP digest authentication,
which require the server to calculate a hash of the received POST body.
If making the POST body available on the php://input stream AT ALL TIMES regardless of the encoding
type is impractical (possibly due to memory requirements when the POST body is very large), an
alternative would be to stream the POST body, unaltered, directly to a temporary file. (Similar to
the way files uploaded with HTML forms are streamed to temporary files referenced in the $_FILES[]
superglobal.)
This would allow authors to fully implement HTTP digest authentication in their scripts, and open up
any other other possible situations where one might require an exact bit-accurate copy of the POST
body.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=41191&edit=1