Browse code

Bugfix: use extra headers -- allows Requester Pays for buckets you don't own. Patch from http://arxiv.org/help/bulk_data_s3

Brendan O'Connor authored on 2012/04/02 08:15:26
Showing 1 changed files
... ...
@@ -60,6 +60,9 @@ class S3Request(object):
60 60
     def __init__(self, s3, method_string, resource, headers, params = {}):
61 61
         self.s3 = s3
62 62
         self.headers = SortedDict(headers or {}, ignore_case = True)
63
+        # Add in any extra headers from s3 config object
64
+        if self.s3.config.extra_headers:
65
+            self.headers.update(self.s3.config.extra_headers)
63 66
         self.resource = resource
64 67
         self.method_string = method_string
65 68
         self.params = params