web/lib/Zend/Service/WindowsAzure/Credentials/SharedKey.php
changeset 807 877f952ae2bd
parent 207 621fa6caec0c
child 1230 68c69c656a2c
--- a/web/lib/Zend/Service/WindowsAzure/Credentials/SharedKey.php	Thu Mar 21 17:31:31 2013 +0100
+++ b/web/lib/Zend/Service/WindowsAzure/Credentials/SharedKey.php	Thu Mar 21 19:50:53 2013 +0100
@@ -14,9 +14,9 @@
  *
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
- * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @version    $Id: SharedKey.php 23167 2010-10-19 17:53:31Z mabe $
+ * @version    $Id: SharedKey.php 24593 2012-01-05 20:35:02Z matthew $
  */
 
 /**
@@ -25,24 +25,9 @@
 require_once 'Zend/Service/WindowsAzure/Credentials/CredentialsAbstract.php';
 
 /**
- * @see Zend_Service_WindowsAzure_Storage
- */
-require_once 'Zend/Service/WindowsAzure/Storage.php';
-
-/**
- * @see Zend_Http_Client
- */
-require_once 'Zend/Http/Client.php';
-
-/**
- * @see Zend_Service_WindowsAzure_Credentials_Exception
- */
-require_once 'Zend/Service/WindowsAzure/Credentials/Exception.php';
-
-/**
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
- * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */ 
 class Zend_Service_WindowsAzure_Credentials_SharedKey
@@ -91,6 +76,7 @@
 
 		// Table storage?
 		if ($forTableStorage) {
+			require_once 'Zend/Service/WindowsAzure/Credentials/Exception.php';
 			throw new Zend_Service_WindowsAzure_Credentials_Exception('The Windows Azure SDK for PHP does not support SharedKey authentication on table storage. Use SharedKeyLite authentication instead.');
 		}
 		
@@ -115,7 +101,7 @@
 		}
 		
 		// Build canonicalized headers
-		if ($headers !== null) {
+		if (!is_null($headers)) {
 			foreach ($headers as $header => $value) {
 				if (is_bool($value)) {
 					$value = $value === true ? 'True' : 'False';
@@ -138,7 +124,7 @@
 		if ($queryString !== '') {
 		    $queryStringItems = $this->_makeArrayOfQueryString($queryString);
 		    foreach ($queryStringItems as $key => $value) {
-		    	$canonicalizedResource .= "\n" . strtolower($key) . ':' . $value;
+		    	$canonicalizedResource .= "\n" . strtolower($key) . ':' . urldecode($value);
 		    }
 		}
 		
@@ -149,7 +135,7 @@
 			 && strtoupper($httpVerb) != Zend_Http_Client::HEAD) {
 			$contentLength = 0;
 			
-			if ($rawData !== null) {
+			if (!is_null($rawData)) {
 				$contentLength = strlen($rawData);
 			}
 		}