diff --git a/swift/common/middleware/s3api/s3request.py b/swift/common/middleware/s3api/s3request.py index f34c06aabc..a144ccc645 100644 --- a/swift/common/middleware/s3api/s3request.py +++ b/swift/common/middleware/s3api/s3request.py @@ -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): """ diff --git a/test/unit/common/middleware/s3api/test_s3api.py b/test/unit/common/middleware/s3api/test_s3api.py index c2463ac714..02b4d5237e 100644 --- a/test/unit/common/middleware/s3api/test_s3api.py +++ b/test/unit/common/middleware/s3api/test_s3api.py @@ -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',