Author: chabotc
Date: Sun Jun 14 12:45:48 2009
New Revision: 784551
URL: http://svn.apache.org/viewvc?rev=784551&view=rev
Log:
Removed the decoding of the post data, this was causing issues with ='s in the
values
Modified:
incubator/shindig/trunk/php/src/gadgets/ProxyBase.php
Modified: incubator/shindig/trunk/php/src/gadgets/ProxyBase.php
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/gadgets/ProxyBase.php?rev=784551&r1=784550&r2=784551&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/gadgets/ProxyBase.php (original)
+++ incubator/shindig/trunk/php/src/gadgets/ProxyBase.php Sun Jun 14 12:45:48
2009
@@ -26,7 +26,7 @@
* @var GadgetContext
*/
public $context;
-
+
protected $disallowedHeaders = array('User-Agent', 'Keep-Alive', 'Host',
'Accept-Encoding', 'Set-Cookie', 'Content-Length', 'Content-Encoding', 'ETag',
'Last-Modified', 'Accept-Ranges', 'Vary', 'Expires', 'Date', 'Pragma',
'Cache-Control', 'Transfer-Encoding', 'If-Modified-Since');
public function __construct($context) {
@@ -54,33 +54,13 @@
}
}
if ($method == 'POST') {
- $data = isset($_GET['postData']) ? $_GET['postData'] : false;
- if (! $data) {
- $data = isset($_POST['postData']) ? $_POST['postData'] : false;
- }
- $postData = '';
- if ($data) {
- $entries = explode('&', $data);
- foreach ($entries as $entry) {
- $entry = urldecode($entry);
- $parts = explode('=', $entry);
- // Process only if its a valid value=something pair
- if (count($parts) == 2) {
- $postData .= urlencode($parts[0]) . '=' . urlencode($parts[1]) .
'&';
- }
- }
- // chop of the trailing &
- if (strlen($postData)) {
- $postData = substr($postData, 0, strlen($postData) - 1);
- }
- }
+ $postData = isset($_GET['postData']) ? $_GET['postData'] :
(isset($_POST['postData']) ? $_POST['postData'] : false);
// even if postData is an empty string, it will still post (since
RemoteContentRquest checks if its false)
// so the request to POST is still honored
$request = new RemoteContentRequest($url, null, $postData);
} else {
$request = new RemoteContentRequest($url);
}
-
if ($signer) {
$authz = isset($_GET['authz']) ? $_GET['authz'] :
(isset($_POST['authz']) ? $_POST['authz'] : '');
switch (strtoupper($authz)) {