From 8070368e1307e3b9dbcaf5803bb9771cc340581f Mon Sep 17 00:00:00 2001 From: Paul Chen Date: Fri, 21 Nov 2008 21:41:26 +0000 Subject: [PATCH] --- common.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common.php b/common.php index b18ba78..92f5540 100644 --- a/common.php +++ b/common.php @@ -50,7 +50,7 @@ function sign($a, $apiKey, $debug=false) { $n = count($a); $i = 0; foreach (array_keys($a) as $key) { - $qs .= $key.'='.$a[$key]; + $qs .= trim($key).'='.trim($a[$key]); if (++$i < $n) { $qs .= '&'; } @@ -65,7 +65,6 @@ function sign($a, $apiKey, $debug=false) { $hmac = base64_encode($hmac); if ($debug) { debug('h='.$hmac); - debug('Submit the request >> '); } return $hmac;