Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

s3 file store should accept all supported headers

Lucy Wang7551689c75a1
diff --git a/scrapy/pipelines/files.py b/scrapy/pipelines/files.py
index 2145e6d2b..ea06d2ae8 100644
--- a/scrapy/pipelines/files.py
+++ b/scrapy/pipelines/files.py
@@ -189,6 +189,19 @@ class S3FilesStore(object):
'X-Amz-Grant-Read': 'GrantRead',
'X-Amz-Grant-Read-ACP': 'GrantReadACP',
'X-Amz-Grant-Write-ACP': 'GrantWriteACP',
+ 'X-Amz-Object-Lock-Legal-Hold': 'ObjectLockLegalHoldStatus',
+ 'X-Amz-Object-Lock-Mode': 'ObjectLockMode',
+ 'X-Amz-Object-Lock-Retain-Until-Date': 'ObjectLockRetainUntilDate',
+ 'X-Amz-Request-Payer': 'RequestPayer',
+ 'X-Amz-Server-Side-Encryption': 'ServerSideEncryption',
+ 'X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id': 'SSEKMSKeyId',
+ 'X-Amz-Server-Side-Encryption-Context': 'SSEKMSEncryptionContext',
+ 'X-Amz-Server-Side-Encryption-Customer-Algorithm': 'SSECustomerAlgorithm',
+ 'X-Amz-Server-Side-Encryption-Customer-Key': 'SSECustomerKey',
+ 'X-Amz-Server-Side-Encryption-Customer-Key-Md5': 'SSECustomerKeyMD5',
+ 'X-Amz-Storage-Class': 'StorageClass',
+ 'X-Amz-Tagging': 'Tagging',
+ 'X-Amz-Website-Redirect-Location': 'WebsiteRedirectLocation',
})
extra = {}
for key, value in six.iteritems(headers):