Author: chabotc
Date: Tue Jul 14 12:52:42 2009
New Revision: 793890
URL: http://svn.apache.org/viewvc?rev=793890&view=rev
Log:
SHINDIG-1112 by Johan Euphrosine - SignedFetcher doesn't forward
gadgets.io.RequestParameters.HEADERS
Modified:
incubator/shindig/branches/1.0.x-incubating/php/src/gadgets/SigningFetcher.php
Modified:
incubator/shindig/branches/1.0.x-incubating/php/src/gadgets/SigningFetcher.php
URL:
http://svn.apache.org/viewvc/incubator/shindig/branches/1.0.x-incubating/php/src/gadgets/SigningFetcher.php?rev=793890&r1=793889&r2=793890&view=diff
==============================================================================
---
incubator/shindig/branches/1.0.x-incubating/php/src/gadgets/SigningFetcher.php
(original)
+++
incubator/shindig/branches/1.0.x-incubating/php/src/gadgets/SigningFetcher.php
Tue Jul 14 12:52:42 2009
@@ -28,25 +28,25 @@
* but instances may be created by multiple threads.
*/
class SigningFetcher extends RemoteContentFetcher {
-
+
protected static $OPENSOCIAL_OWNERID = "opensocial_owner_id";
protected static $OPENSOCIAL_VIEWERID = "opensocial_viewer_id";
protected static $OPENSOCIAL_APPID = "opensocial_app_id";
protected static $XOAUTH_PUBLIC_KEY = "xoauth_signature_publickey";
protected static $ALLOWED_PARAM_NAME = '^[-_[:alnum:]]+$';
-
+
/**
* Authentication token for the user and gadget making the request.
*/
protected $authToken;
-
+
/**
* Private key we pass to the OAuth RSA_SHA1 algorithm.This can be a
* PrivateKey object, or a PEM formatted private key, or a DER encoded byte
* array for the private key.(No, really, they accept any of them.)
*/
protected $privateKeyObject;
-
+
/**
* The name of the key, included in the fetch to help with key rotation.
*/
@@ -175,7 +175,7 @@
$url = $parsedUri['scheme'] . '://' . $parsedUri['host'] .
(isset($parsedUri['port']) ? ':' . $parsedUri['port'] : '') .
$parsedUri['path'] . '?' . $newQuery;
// The headers are transmitted in the POST-data array in the field
'headers'
// if no post should be made, the value should be false for this
parameter
- $postHeaders = ((isset($_POST['headers']) && $method == 'POST') ?
$_POST['headers'] : false);
+ $postHeaders = ((isset($_POST['headers']) && $method == 'POST') ?
urldecode(str_replace("&", "\n", str_replace("=", ": ", $_POST['headers']))) :
false);
return new RemoteContentRequest($url, $postHeaders, $postData);
} catch (Exception $e) {
throw new GadgetException($e);