File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
swift/common/middleware/s3api
test/unit/common/middleware/s3api Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -749,7 +749,10 @@ def _validate_headers(self):
749
749
750
750
# https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-streaming.html
751
751
# describes some of what would be required to support this
752
- if 'aws-chunked' in self .headers .get ('content-encoding' , '' ):
752
+ if any (['aws-chunked' in self .headers .get ('content-encoding' , '' ),
753
+ 'STREAMING-AWS4-HMAC-SHA256-PAYLOAD' == self .headers .get (
754
+ 'x-amz-content-sha256' , '' ),
755
+ 'x-amz-decoded-content-length' in self .headers ]):
753
756
raise S3NotImplemented ('Transfering payloads in multiple chunks '
754
757
'using aws-chunked is not supported.' )
755
758
Original file line number Diff line number Diff line change @@ -574,6 +574,11 @@ def test_aws_chunked(self):
574
574
# > That is, you can specify your custom content-encoding when using
575
575
# > Signature Version 4 streaming API.
576
576
self ._test_unsupported_header ('Content-Encoding' , 'aws-chunked,gzip' )
577
+ # Some clients skip the content-encoding,
578
+ # such as minio-go and aws-sdk-java
579
+ self ._test_unsupported_header ('x-amz-content-sha256' ,
580
+ 'STREAMING-AWS4-HMAC-SHA256-PAYLOAD' )
581
+ self ._test_unsupported_header ('x-amz-decoded-content-length' )
577
582
578
583
def test_object_tagging (self ):
579
584
self ._test_unsupported_header ('x-amz-tagging' )
You can’t perform that action at this time.
0 commit comments