Bug #68212 [Opn->Nab]: stream_get_contents and PUT data
| From: | requinix@php.net | Date: | Sat, 11 Oct 2014 08:07:14 +0000 |
| Subject: | Bug #68212 [Opn->Nab]: stream_get_contents and PUT data | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-188021@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68212&edit=1
ID: 68212
Updated by: requinix@php.net
Reported by: esmaeilpoor dot info at gmail dot com
Summary: stream_get_contents and PUT data
-Status: Open
+Status: Not a bug
Type: Bug
Package: Unknown/Other Function
Operating System: ubuntu
PHP Version: 5.5.17
Block user comment: N
Private report: N
New Comment:
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP --
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php
If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
Fixed in 5.6.
http://php.net/manual/en/wrappers.php.php#wrappers.php.input
https://wiki.php.net/rfc/slim_post_data
Previous Comments:
------------------------------------------------------------------------
[2014-10-11 07:58:17] esmaeilpoor dot info at gmail dot com
Description:
------------
stream_get_contents destroy PUT data
Test script:
---------------
$ curl -X PUT -d 'foo' http://localhost/test.php
File test.php
-------------
$s = fopen('php://input', 'r');
$b = stream_get_contents($s);
fclose($s);
var_dump($b, file_get_contents("php://input"));
Expected result:
----------------
string(3) "foo"
string(3) "foo"
Actual result:
--------------
string(3) "foo"
string(0) ""
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68212&edit=1