summaryrefslogtreecommitdiff
path: root/bin/swift
diff options
context:
space:
mode:
authorMatthieu Huin <mhu@enovance.com>2013-09-27 11:40:34 +0200
committerMatthieu Huin <mhu@enovance.com>2013-09-27 11:40:34 +0200
commitafa1f9f76d69471be7d97f3792bd5bdf9add3685 (patch)
tree78ac0b04c7fc47d3366ce93833458d3f57d8433a /bin/swift
parent68dde8dd514e4eef89aafa6c1c93e065045c3cbd (diff)
downloadpython-swiftclient-afa1f9f76d69471be7d97f3792bd5bdf9add3685.tar.gz
user defined headers added to swift post queries
This commit fixes a problem where headers passed through the option --header were not taken into account when doing "post" queries. Change-Id: Ia34808c53a1816d9956a98e0803d8c4d20d2ad44 Closes-Bug: #1226256
Diffstat (limited to 'bin/swift')
-rwxr-xr-xbin/swift2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/swift b/bin/swift
index 4d11bae..2f25ca8 100755
--- a/bin/swift
+++ b/bin/swift
@@ -807,6 +807,7 @@ def st_post(parser, args, thread_manager):
if not args:
headers = split_headers(
options.meta, 'X-Account-Meta-', thread_manager)
+ headers.update(split_headers(options.header, '', thread_manager))
try:
conn.post_account(headers=headers)
except ClientException as err:
@@ -820,6 +821,7 @@ def st_post(parser, args, thread_manager):
(args[0].replace('/', ' ', 1), args[0])
headers = split_headers(options.meta, 'X-Container-Meta-',
thread_manager)
+ headers.update(split_headers(options.header, '', thread_manager))
if options.read_acl is not None:
headers['X-Container-Read'] = options.read_acl
if options.write_acl is not None: