Merge "Disallow uploads with x-amz-tagging headers set"

This commit is contained in:
Zuul 2018-08-11 01:42:06 +00:00 committed by Gerrit Code Review
commit 9b19df362f
2 changed files with 6 additions and 0 deletions

View File

@ -700,6 +700,9 @@ class S3Request(swob.Request):
raise S3NotImplemented('Transfering payloads in multiple chunks '
'using aws-chunked is not supported.')
if 'x-amz-tagging' in self.headers:
raise S3NotImplemented('Object tagging is not supported.')
@property
def body(self):
"""

View File

@ -487,6 +487,9 @@ class TestS3ApiMiddleware(S3ApiTestCase):
# > Signature Version 4 streaming API.
self._test_unsupported_header('Content-Encoding', 'aws-chunked,gzip')
def test_object_tagging(self):
self._test_unsupported_header('x-amz-tagging')
def _test_unsupported_resource(self, resource):
req = Request.blank('/error?' + resource,
environ={'REQUEST_METHOD': 'GET',