Req #17306 [Com]: Support for multipart forms

From: Date: Thu, 03 Jun 2010 11:41:48 +0000
Subject: Req #17306 [Com]: Support for multipart forms
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-3870@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=17306&edit=1 ID: 17306 Comment by: evert@rooftopsolutions.nl Reported By: steffen at 23company dot com Summary: Support for multipart forms Status: Open Type: Feature/Change Request Package: HTTP_OAuth Operating System: Mac OS X Package Version: 0.1.9 PHP Version: 5.3.0 Roadmap Versions: New Comment: Excuse the 'Me too', but yes.. I'm also facing this issue. The oauth specification *only* requires post-parameters to be encoded in the signature uri, *if* they are application/x-www-form-urlencoded. If this is not the case (basically anything but application/x-www-form-urlencoded, including multipart/form-data or application/xml) the request body can be completely ignored. Please consider Steffen's suggestion. Without it, this PEAR library is unusable with the Dropbox API (https://www.dropbox.com/), which deals with file uploads. Previous Comments: ------------------------------------------------------------------------ [2010-04-11 11:03:44] steffentchr Description: ------------ In the current version of the library, POST request are forced to be "x-www-form-urlencoded": http://github.com/jeffhodsdon/HTTP_OAuth/blob/master/HTTP/OAuth/Consumer/Request.php#L259 This makes the code unusable for making OAuth signed multipart form requests. Even if OAuth 1.0a doesn't prescribe a good way of signing the content in such a request, there are cases where such request are needed. My suggestion is to simply remove line 259 in Consumer/Request.php. Without this specific line, HTTP_Request2 will handle the content type magically, and developers will be able to handle multipart requests in a manner like this: http://github.com/23/DeveloperDocumentation/blob/master/lib/php/visualplatform-command.php#L54-67 ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=17306&edit=1

« previous php.pear.bugs (#3870) next »