|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2015-09-24 23:51 UTC] requinix@php.net
 
-Status:      Open
+Status:      Closed
-Assigned To:
+Assigned To: mike
  [2015-09-24 23:51 UTC] requinix@php.net
  [2015-09-25 07:28 UTC] mike@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 11:00:01 2025 UTC | 
Description: ------------ On HTTP PUT and PATCH Methods all PHP file methods can read php://input just one time. In the method post 2 times the value appears as expected, but the put and patch methods returns only one time. Test script: --------------- <?php var_dump(file_get_contents('php://input')); var_dump(file_get_contents('php://input')); ?> Send DATA using HTTP POST and after HTTP PUT or PATCH. Actual result: -------------- curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d 'var1=val2&var2=val2' 'http://localhost/testmethod.php' result: string(19) "var1=val2&var2=val2" string(19) "var1=val2&var2=val2" curl -X PUT -H "Content-Type: application/x-www-form-urlencoded" -d 'var1=val2&var2=val2' 'http://localhost/testmethod.php' result: string(19) "var1=val2&var2=val2" string(0) "" curl -X PATCH -H "Content-Type: application/x-www-form-urlencoded" -d 'var1=val2&var2=val2' 'http://localhost/testmethod.php' result: string(19) "var1=val2&var2=val2" string(0) ""