Req #55815 [Opn->Sus]: PUT request data should be parsed just like POST

From: Date: Sat, 06 Jul 2019 00:01:49 +0000
Subject: Req #55815 [Opn->Sus]: PUT request data should be parsed just like POST
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-221649@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=55815&edit=1

 ID:                 55815
 Updated by:         requinix@php.net
 Reported by:        catch dot dave at gmail dot com
 Summary:            PUT request data should be parsed just like POST
-Status:             Open
+Status:             Suspended
 Type:               Feature/Change Request
 Package:            Streams related
 Operating System:   All
 PHP Version:        5.4.0beta1
 Block user comment: N
 Private report:     N

 New Comment:

This needs to go through the RFC process. https://wiki.php.net/rfc/howto


Previous Comments:
------------------------------------------------------------------------
[2019-07-05 22:17:11] jasny@php.net

How ca, this be solved?
----

Change the type of ini setting enable_post_data_reading to a string. This setting takes
a comma-separated list with methods. E.g. "POST,PUT,PATCH".

For BC also allow a boolean: true is "POST" and false is
"".

---
This will likely need to be proposed as RFC rather than a simple patch.

------------------------------------------------------------------------
[2019-01-19 15:50:04] arkemlar at gmail dot com

The but exising over 8 years! Really, for me it sounds like:
- Me: Hey PHP, I want to implement nice restful API
- PHP: OK
... over time ...
- Me: What? I cant use PUT to modify my entity? WTF dude?
- Reqeust parsing for PUT is not implemented
- Why?
- Because maintainers __believe__ it should not be done for PUT
- This literally means: go and f**k urself man becasue now I forced to broke my perfectly designed
API by using POST whilest it must be PUT.

In age of RESTful API we cant simply use PUT, perfect!

------------------------------------------------------------------------
[2018-10-05 08:23:17] a at anze dot com

Was there any development to allow multipart/form-data on PATCH, PUT, DELETE.. type of requests?

PHP is not suitable for RESTful API development not having this supported.

------------------------------------------------------------------------
[2015-10-02 13:01:47] carsten at bleicker dot de

Parse body for any kind of requests.
Keep old superglobals, make them deprecated [get,post]
Introduce http_request_body_raw, http_request_body_parsed, http_request_arguments.
Its realy bad currently having no chance getting the request body for a patch request, f.e.
we definitly need proper http handling for the http-api world.

------------------------------------------------------------------------
[2015-05-31 04:08:03] drew at funkhaus dot us

Ember Data uses PUT when updating a REST API endpoint. It sends it as form-data.

PHP not working with PUT or DELETE means you can't use Ember Data, and thus big parts of the
Ember framework.

I'd love it if PHP had someway of parsing PUT or the other HTTP methods. Currently I have to
write a bunch of regex, which sucks.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=55815


--
Edit this bug report at https://bugs.php.net/bug.php?id=55815&edit=1


Thread (28 messages)

« previous php.bugs (#221649) next »