Stop harder sending underscores in header names to Swift

Change-Id: Id93acb1b75b3eda11fb770c86459b024640f1515
This commit is contained in:
Dr. Jens Harbott 2024-12-16 15:58:05 +01:00
parent 422131d952
commit d22eeda3b8

View File

@ -41,7 +41,12 @@ class ContainerClient(rest_client.RestClient):
"""
url = str(container_name)
resp, body = self.put(url, body=None, headers=headers)
new_headers = {}
for key in headers:
new_key = key.replace('_', '-')
new_headers[new_key] = headers[key]
resp, body = self.put(url, body=None, headers=new_headers)
self.expected_success([201, 202, 204], resp.status)
return resp, body