Skip to content

Commit accacb2

Browse files
Support capitalized Content-Type header (#32)
Normalize all header keys to lowercase
1 parent 878b27a commit accacb2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/polite-goats-taste.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@as-integrations/aws-lambda': patch
3+
---
4+
5+
Downcase all header keys during normalization

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ function normalizeHeaders(
169169
): Map<string, string> {
170170
const headerMap = new Map<string, string>();
171171
for (const [key, value] of Object.entries(headers)) {
172-
headerMap.set(key, value ?? '');
172+
headerMap.set(key.toLocaleLowerCase(), value ?? '');
173173
}
174174
return headerMap;
175175
}

0 commit comments

Comments
 (0)