You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2012/02/11 08:33:02 UTC

svn commit: r1243010 - /libcloud/trunk/libcloud/storage/drivers/s3.py

Author: tomaz
Date: Sat Feb 11 07:33:01 2012
New Revision: 1243010

URL: http://svn.apache.org/viewvc?rev=1243010&view=rev
Log:
Don't lowercase special headers in the S3 storage driver. Reported by Florent
Cayré, part of LIBCLOUD-149.

Modified:
    libcloud/trunk/libcloud/storage/drivers/s3.py

Modified: libcloud/trunk/libcloud/storage/drivers/s3.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/storage/drivers/s3.py?rev=1243010&r1=1243009&r2=1243010&view=diff
==============================================================================
--- libcloud/trunk/libcloud/storage/drivers/s3.py (original)
+++ libcloud/trunk/libcloud/storage/drivers/s3.py Sat Feb 11 07:33:01 2012
@@ -118,9 +118,10 @@ class S3Connection(ConnectionUserAndKey)
 
         headers_copy = copy.deepcopy(headers)
         for key, value in list(headers_copy.items()):
-            if key.lower() in special_header_keys:
-                special_header_values[key.lower()] = value.lower().strip()
-            elif key.lower().startswith('x-amz-'):
+            key_lower = key.lower()
+            if key_lower in special_header_keys:
+                special_header_values[key_lower] = value.strip()
+            elif key_lower.startswith('x-amz-'):
                 amz_header_values[key.lower()] = value.strip()
 
         if not 'content-md5' in special_header_values: