From a3967b86526765c8c7480a68429fa8c30c1860ff Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Mon, 17 Jan 2022 13:44:29 -0800 Subject: [PATCH] case insensitive header search --- src/aws.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aws.zig b/src/aws.zig index 6c5bea1..c46824b 100644 --- a/src/aws.zig +++ b/src/aws.zig @@ -227,7 +227,7 @@ pub fn Request(comptime action: anytype) type { // look at the return type var isJson: bool = undefined; for (response.headers) |h| { - if (std.mem.eql(u8, "Content-Type", h.name)) { + if (std.ascii.eqlIgnoreCase("Content-Type", h.name)) { if (std.mem.startsWith(u8, h.value, "application/json")) { isJson = true; } else if (std.mem.startsWith(u8, h.value, "application/x-amz-json-1.0")) {