From 657b9ac04617068c4a240b843a127746a76160d7 Mon Sep 17 00:00:00 2001 From: niksis02 Date: Tue, 30 Dec 2025 12:21:54 +0400 Subject: [PATCH] fix: changes AuthorizationHeaderMalformed error status to 400 Fixes #1706 Changes the `AuthorizationHeaderMalformed` error http status code from `403` to `400`. --- s3err/sigv4.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s3err/sigv4.go b/s3err/sigv4.go index e8aff841..5eba1f82 100644 --- a/s3err/sigv4.go +++ b/s3err/sigv4.go @@ -24,7 +24,7 @@ func malformedAuthError(format string, args ...any) APIError { return APIError{ Code: "AuthorizationHeaderMalformed", Description: fmt.Sprintf("The authorization header is malformed; %s", fmt.Sprintf(format, args...)), - HTTPStatusCode: http.StatusForbidden, + HTTPStatusCode: http.StatusBadRequest, } }