Send application/octet-stream Content-Type on create_object
authorGiorgos Verigakis <verigak@gmail.com>
Wed, 4 Apr 2012 09:54:19 +0000 (12:54 +0300)
committerGiorgos Verigakis <verigak@gmail.com>
Wed, 9 May 2012 10:18:48 +0000 (13:18 +0300)
kamaki/clients/pithos.py

index bf5d893..22bf8bc 100644 (file)
@@ -107,8 +107,10 @@ class PithosClient(StorageClient):
         path = '/%s/%s/%s' % (self.account, self.container, object)
         params = dict(format='json', hashmap='')
         hashmap = dict(bytes=size, hashes=hashes)
-        r = self.put(path, params=params, json=hashmap, success=(201, 409))
-        
+        headers = {'Content-Type': 'application/octet-stream'}
+        r = self.put(path, params=params, headers=headers, json=hashmap,
+                     success=(201, 409))
+
         if r.status_code == 201:
             return