diff --git a/s3err/s3err.go b/s3err/s3err.go index 92586aab..a0fb2cb5 100644 --- a/s3err/s3err.go +++ b/s3err/s3err.go @@ -527,7 +527,7 @@ var errorCodeResponse = map[ErrorCode]APIError{ ErrMissingDateHeader: { Code: "AccessDenied", Description: "AWS authentication requires a valid Date or x-amz-date header.", - HTTPStatusCode: http.StatusBadRequest, + HTTPStatusCode: http.StatusForbidden, }, ErrGetUploadsWithKey: { Code: "InvalidRequest", diff --git a/tests/test_rest_list_buckets.sh b/tests/test_rest_list_buckets.sh index ddd49761..45bb943e 100755 --- a/tests/test_rest_list_buckets.sh +++ b/tests/test_rest_list_buckets.sh @@ -232,7 +232,7 @@ export RUN_USERS=true } @test "REST - ListBuckets - error Content-Type is application/xml" { - run send_rest_go_command_check_header_key_and_value "400" "Content-Type" "application/xml" "-method" "GET" "-omitDate" + run send_rest_go_command_check_header_key_and_value "403" "Content-Type" "application/xml" "-method" "GET" "-omitDate" assert_success }