From 46e3a4de110456b145f00e7fc9ea3c6ddc71545a Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Sat, 28 May 2022 18:01:49 -0700 Subject: [PATCH] add additional request id for CloudFront --- src/aws.zig | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/aws.zig b/src/aws.zig index b272ee7..7ef00dd 100644 --- a/src/aws.zig +++ b/src/aws.zig @@ -399,10 +399,13 @@ pub fn Request(comptime action: anytype) type { // so we'll use that var host_id: ?[]const u8 = null; for (result.headers) |header| { - if (std.ascii.eqlIgnoreCase(header.name, "x-amz-request-id")) { + if (std.ascii.eqlIgnoreCase(header.name, "x-amzn-requestid")) { // CloudFront rid = header.value; } - if (std.ascii.eqlIgnoreCase(header.name, "x-amz-id-2")) { + if (std.ascii.eqlIgnoreCase(header.name, "x-amz-request-id")) { // S3 + rid = header.value; + } + if (std.ascii.eqlIgnoreCase(header.name, "x-amz-id-2")) { // S3 host_id = header.value; } }