Skip to content

Commit 26273b6

Browse files
Michael Bonfilsfvennetier
authored andcommitted
MPU: handle x-amz-tagging
1 parent 3682a39 commit 26273b6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

swift3/controllers/multi_upload.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@
6666
log_s3api_command, sysmeta_header
6767
from swift3.etree import Element, SubElement, fromstring, tostring, \
6868
XMLSyntaxError, DocumentInvalid
69+
from swift3.controllers.tagging import OBJECT_TAGGING_HEADER, \
70+
HTTP_HEADER_TAGGING_KEY, convert_urlquery_to_xml
6971
from swift3.cfg import CONF
7072

7173
DEFAULT_MAX_PARTS_LISTING = 1000
@@ -462,6 +464,11 @@ def POST(self, req):
462464

463465
obj = '%s/%s' % (req.object_name, upload_id)
464466

467+
if HTTP_HEADER_TAGGING_KEY in req.headers:
468+
tagging = convert_urlquery_to_xml(
469+
req.headers.get(HTTP_HEADER_TAGGING_KEY))
470+
req.headers[OBJECT_TAGGING_HEADER] = tagging
471+
465472
req.headers.pop('Etag', None)
466473
req.headers.pop('Content-Md5', None)
467474
req.environ['oio.ephemeral_object'] = True
@@ -650,6 +657,10 @@ def POST(self, req):
650657
headers['x-object-meta-' + _key[11:]] = val
651658
elif _key == 'content-type':
652659
headers['Content-Type'] = val
660+
for key, val in resp.sysmeta_headers.items():
661+
_key = key.lower()
662+
if _key == OBJECT_TAGGING_HEADER.lower():
663+
headers[key] = val
653664

654665
# Query for the objects in the segments area to make sure it completed
655666
query = {

0 commit comments

Comments
 (0)