From 709b57f7b684eee50a2a63d9f73c6f3520186778 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Mon, 12 May 2025 17:22:21 +0200 Subject: [PATCH] Fix "X-Amz-User-Agent" in blacklist The header blacklist contains lowercase header names only, except "X-Amz-User-Agent". This causes this header not to be filtered out, leading to an error with some proxies that remove the empty header: > There were headers present in the request which were not signed. This commit lowercases the header, which correctly removes the header from the signature. Related: https://github.com/aws/aws-sdk-php/pull/2259 Resolves: https://github.com/aws/aws-sdk-php/issues/3119 --- src/Signature/SignatureV4.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Signature/SignatureV4.php b/src/Signature/SignatureV4.php index 74c3940fcc..9a5e296503 100644 --- a/src/Signature/SignatureV4.php +++ b/src/Signature/SignatureV4.php @@ -67,7 +67,7 @@ protected function getHeaderBlacklist() 'from' => true, 'referer' => true, 'user-agent' => true, - 'X-Amz-User-Agent' => true, + 'x-amz-user-agent' => true, 'x-amzn-trace-id' => true, 'aws-sdk-invocation-id' => true, 'aws-sdk-retry' => true,