You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by ch...@apache.org on 2008/05/23 12:50:49 UTC

svn commit: r659496 - /incubator/shindig/trunk/php/src/gadgets/http/SigningFetcher.php

Author: chabotc
Date: Fri May 23 03:50:49 2008
New Revision: 659496

URL: http://svn.apache.org/viewvc?rev=659496&view=rev
Log:
On POST the query part can be empty

Modified:
    incubator/shindig/trunk/php/src/gadgets/http/SigningFetcher.php

Modified: incubator/shindig/trunk/php/src/gadgets/http/SigningFetcher.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/gadgets/http/SigningFetcher.php?rev=659496&r1=659495&r2=659496&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/gadgets/http/SigningFetcher.php (original)
+++ incubator/shindig/trunk/php/src/gadgets/http/SigningFetcher.php Fri May 23 03:50:49 2008
@@ -150,11 +150,13 @@
 				}
 			}
 			// and stick on the original query params too
-			$oldQuery = array();
-			parse_str($parsedUri['query'], $oldQuery);
-			foreach ($oldQuery as $key => $val) {
-				$newQuery .= urlencode($key).'='.urlencode($val).'&';
-			}			
+			if (isset($parsedUri['query']) && !empty($parsedUri['query'])) {
+				$oldQuery = array();
+				parse_str($parsedUri['query'], $oldQuery);
+				foreach ($oldQuery as $key => $val) {
+					$newQuery .= urlencode($key).'='.urlencode($val).'&';
+				}
+			}
 			// Careful here; the OAuth form encoding scheme is slightly different than
 			// the normal form encoding scheme, so we have to use the OAuth library
 			// formEncode method.