From afa1f9f76d69471be7d97f3792bd5bdf9add3685 Mon Sep 17 00:00:00 2001 From: Matthieu Huin Date: Fri, 27 Sep 2013 11:40:34 +0200 Subject: 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 --- bin/swift | 2 ++ 1 file changed, 2 insertions(+) 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: -- cgit v1.2.1