summaryrefslogtreecommitdiff
path: root/swift/common/middleware/s3api/s3request.py
diff options
context:
space:
mode:
Diffstat (limited to 'swift/common/middleware/s3api/s3request.py')
-rw-r--r--swift/common/middleware/s3api/s3request.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/swift/common/middleware/s3api/s3request.py b/swift/common/middleware/s3api/s3request.py
index 059c2b784..56740e36a 100644
--- a/swift/common/middleware/s3api/s3request.py
+++ b/swift/common/middleware/s3api/s3request.py
@@ -448,10 +448,10 @@ class SigV4Mixin(object):
'x-amz-content-sha256'
raise InvalidRequest(msg)
else:
- hashed_payload = self.headers['X-Amz-Content-SHA256'].lower()
- if hashed_payload != 'unsigned-payload':
+ hashed_payload = self.headers['X-Amz-Content-SHA256']
+ if hashed_payload != 'UNSIGNED-PAYLOAD':
if self.content_length == 0:
- if hashed_payload != sha256().hexdigest():
+ if hashed_payload.lower() != sha256().hexdigest():
raise BadDigest(
'The X-Amz-Content-SHA56 you specified did not '
'match what we received.')
@@ -460,7 +460,7 @@ class SigV4Mixin(object):
self.environ['wsgi.input'],
self.content_length,
sha256,
- hashed_payload)
+ hashed_payload.lower())
# else, length not provided -- Swift will kick out a
# 411 Length Required which will get translated back
# to a S3-style response in S3Request._swift_error_codes