Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.3.2

Request #18431 Improvements in handling PUT requests
Submitted: 2011-04-11 15:25 UTC
From: dominik Assigned: doconnor
Status: Closed Package: HTTP_OAuth (version 0.2.2)
PHP Version: 5.2.12 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2011-04-11 15:25 UTC] dominik (Dominik Blunk)
Description: ------------ Because of the fact that PUT must be fetched from the stream php://input and this input can only be read once I changed the constructor in HTTP_OAuth_Provider_Request to pass on params which will be used then. This is most useful when one cannot rely on the fact that the input stream has not already been "fetched" (which is the case when using Zend Framework with the Zend_Controller_Plugin_PutHandler). Test script: --------------- 56a57,63 > > /** > * Raw body data from the incoming request (POST/PUT) > * > * @var string Raw body data from the incoming request (POST/PUT) > */ > protected $rawBodyData = ''; 60a68 > * @param string $rawBodyData raw body data 63c71 < public function __construct() --- > public function __construct($rawBodyData = '') 64a73 > $this->rawBodyData = $rawBodyData; 169c178 < if ($this->getRequestMethod() == 'POST') { --- > if ($this->getRequestMethod() == 'POST' || $this->getRequestMethod() == 'PUT') { 332c341 < return file_get_contents('php://input'); --- > return !empty($this->rawBodyData) ? $this->rawBodyData : file_get_contents('php://input');

Comments

 [2011-04-11 15:26 UTC] dominik (Dominik Blunk)
 [2012-01-25 18:30 UTC] doconnor (Daniel O'Connor)
clockwerx@clockwerx-desktop:~/HTTP_OAuth$ patch -p1 < patch- download.php\? id\=18431\&patch\=HTTP_OAuth_Provider_Request.patch\&revision\=13025211 64 patch: **** Only garbage was found in the patch input. It might be better to fork and send a pull request with your specific changes.
 [2012-01-25 18:38 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Closed -Assigned To: +Assigned To: doconnor
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. https://github.com/jeffhodsdon/HTTP_OAuth/pull/11
 [2013-11-01 01:14 UTC] gauthierm (Michael Gauthier)