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
This commit is contained in:
parent
68dde8dd51
commit
afa1f9f76d
@ -807,6 +807,7 @@ def st_post(parser, args, thread_manager):
|
|||||||
if not args:
|
if not args:
|
||||||
headers = split_headers(
|
headers = split_headers(
|
||||||
options.meta, 'X-Account-Meta-', thread_manager)
|
options.meta, 'X-Account-Meta-', thread_manager)
|
||||||
|
headers.update(split_headers(options.header, '', thread_manager))
|
||||||
try:
|
try:
|
||||||
conn.post_account(headers=headers)
|
conn.post_account(headers=headers)
|
||||||
except ClientException as err:
|
except ClientException as err:
|
||||||
@ -820,6 +821,7 @@ def st_post(parser, args, thread_manager):
|
|||||||
(args[0].replace('/', ' ', 1), args[0])
|
(args[0].replace('/', ' ', 1), args[0])
|
||||||
headers = split_headers(options.meta, 'X-Container-Meta-',
|
headers = split_headers(options.meta, 'X-Container-Meta-',
|
||||||
thread_manager)
|
thread_manager)
|
||||||
|
headers.update(split_headers(options.header, '', thread_manager))
|
||||||
if options.read_acl is not None:
|
if options.read_acl is not None:
|
||||||
headers['X-Container-Read'] = options.read_acl
|
headers['X-Container-Read'] = options.read_acl
|
||||||
if options.write_acl is not None:
|
if options.write_acl is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user