]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Fix PUTs.
authorItamar Turner-Trauring <itamar@futurefoundries.com>
Thu, 21 Mar 2013 18:40:27 +0000 (14:40 -0400)
committerDaira Hopwood <daira@jacaranda.org>
Tue, 4 Aug 2015 17:20:42 +0000 (18:20 +0100)
src/allmydata/storage/backends/cloud/msazure/msazure_container.py
src/allmydata/test/test_storage.py

index f99b0510201eb07d4ada03c10fde45f530aecc4f..2cf09637e260864aec7daf283ce5ec4be0e34df5 100644 (file)
@@ -178,6 +178,7 @@ class MSAzureStorageContainer(CommonContainerMixin):
         # correctly:
         request_headers = {'Content-Length': ["%d" % (len(data),)],
                            'Content-Type': [content_type],
+                           "x-ms-blob-type": ["BlockBlob"],
                            }
         for key, value in metadata.items():
             request_headers["x-ms-meta-%s" % (key,)] = [value]
@@ -232,18 +233,18 @@ if __name__ == '__main__':
     @defer.inlineCallbacks
     def testtransactions():
         yield msc.put_object("key", "the value")
-        print "Uploaded key:'the value'"
+        print "Uploaded 'key', with value 'the value'"
         print
-        print "Get contents:"
+        print "Get contents:",
         result = yield msc.list_objects()
         print [item.key for item in result.contents]
         print "Get key, value is:"
         print (yield msc.get_object("key"))
         print
-        print "Delete item:"
+        print "Delete item..."
         yield msc.delete_object("key")
         print
-        print "Get contents:"
+        print "Get contents:"
         result = yield msc.list_objects()
         print [item.key for item in result.contents]
         reactor.stop()
index 4bdbb51eddef808b72568750d335b3ae3d985a8d..89541d0a7538fa4c5188de1083b56bb0d7b85087 100644 (file)
@@ -1339,6 +1339,7 @@ class MSAzureStorageBackendTests(unittest.TestCase, CloudStorageBackendMixin):
              "Content-Type": ["application/octet-stream"],
              "Content-Length": [str(len("the body"))],
              "x-ms-date": [self.date],
+             "x-ms-blob-type": ["BlockBlob"],
              },
             body="the body",
             need_response_body=False)
@@ -1368,6 +1369,7 @@ class MSAzureStorageBackendTests(unittest.TestCase, CloudStorageBackendMixin):
              "Content-Length": [str(len("the body"))],
              "x-ms-meta-key": ["value"],
              "x-ms-date": [self.date],
+             "x-ms-blob-type": ["BlockBlob"],
              },
             body="the body",
             need_response_body=False)