url = self._make_container_url(self.URI)
url += "?restype=container"
d = self._authorized_http_request("MS Azure PUT container", 'PUT',
- url, {}, body=None,
+ url, {'Content-length': ['0']},
+ body=None,
need_response_body=False)
d.addCallback(lambda (response, body): body)
return d
@defer.inlineCallbacks
def testtransactions():
+ print "Creating container...",
+ try:
+ yield msc.create()
+ except Exception, e:
+ print "failed:", e
+ else:
+ print "succeeded."
yield msc.put_object("key", "the value")
print "Uploaded 'key', with value 'the value'"
print
"MS Azure PUT container", "PUT",
"https://theaccount.blob.core.windows.net/thebucket?restype=container",
{"Authorization": [self.authorization],
+ # This is not documented as required, but is apparently necessary
+ # nonetheless:
+ 'Content-length': ['0'],
"x-ms-version": ["2012-02-12"],
"x-ms-date": [self.date],
},