Skip to content

Commit 02dd890

Browse files
committed
Ensure mimetype case differences do not break signing
1 parent 4fb376e commit 02dd890

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/s3.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ DECLARE
9898
BEGIN
9999

100100
http_method := upper(http_method);
101+
object_mimetype := lower(object_mimetype);
101102

102103
IF object_payload IS NOT NULL
103104
THEN
@@ -113,7 +114,7 @@ BEGIN
113114
-- so content-type goes first
114115
IF object_payload IS NOT NULL
115116
THEN
116-
canonical_headers := 'content-type:' || lower(object_mimetype) || E'\n' || canonical_headers;
117+
canonical_headers := 'content-type:' || object_mimetype || E'\n' || canonical_headers;
117118
signed_headers := 'content-type;' || signed_headers;
118119
END IF;
119120

0 commit comments

Comments
 (0)