Merge "s3api: Look for more indications of aws-chunked uploads"
This commit is contained in:
@@ -749,7 +749,10 @@ class S3Request(swob.Request):
|
|||||||
|
|
||||||
# https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-streaming.html
|
# https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-streaming.html
|
||||||
# describes some of what would be required to support this
|
# describes some of what would be required to support this
|
||||||
if 'aws-chunked' in self.headers.get('content-encoding', ''):
|
if any(['aws-chunked' in self.headers.get('content-encoding', ''),
|
||||||
|
'STREAMING-AWS4-HMAC-SHA256-PAYLOAD' == self.headers.get(
|
||||||
|
'x-amz-content-sha256', ''),
|
||||||
|
'x-amz-decoded-content-length' in self.headers]):
|
||||||
raise S3NotImplemented('Transfering payloads in multiple chunks '
|
raise S3NotImplemented('Transfering payloads in multiple chunks '
|
||||||
'using aws-chunked is not supported.')
|
'using aws-chunked is not supported.')
|
||||||
|
|
||||||
|
@@ -607,6 +607,11 @@ class TestS3ApiMiddleware(S3ApiTestCase):
|
|||||||
# > That is, you can specify your custom content-encoding when using
|
# > That is, you can specify your custom content-encoding when using
|
||||||
# > Signature Version 4 streaming API.
|
# > Signature Version 4 streaming API.
|
||||||
self._test_unsupported_header('Content-Encoding', 'aws-chunked,gzip')
|
self._test_unsupported_header('Content-Encoding', 'aws-chunked,gzip')
|
||||||
|
# Some clients skip the content-encoding,
|
||||||
|
# such as minio-go and aws-sdk-java
|
||||||
|
self._test_unsupported_header('x-amz-content-sha256',
|
||||||
|
'STREAMING-AWS4-HMAC-SHA256-PAYLOAD')
|
||||||
|
self._test_unsupported_header('x-amz-decoded-content-length')
|
||||||
|
|
||||||
def test_object_tagging(self):
|
def test_object_tagging(self):
|
||||||
self._test_unsupported_header('x-amz-tagging')
|
self._test_unsupported_header('x-amz-tagging')
|
||||||
|
Reference in New Issue
Block a user