From 88b20b39f013d6edba98f5293e5e20fc1faf1ede Mon Sep 17 00:00:00 2001 From: Matt Muller Date: Wed, 5 Jun 2024 18:37:24 -0400 Subject: [PATCH] Match more than one whitespace if present --- gems/aws-sdk-s3/lib/aws-sdk-s3/plugins/http_200_errors.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gems/aws-sdk-s3/lib/aws-sdk-s3/plugins/http_200_errors.rb b/gems/aws-sdk-s3/lib/aws-sdk-s3/plugins/http_200_errors.rb index 605d3359c07..84ea5ca21f3 100644 --- a/gems/aws-sdk-s3/lib/aws-sdk-s3/plugins/http_200_errors.rb +++ b/gems/aws-sdk-s3/lib/aws-sdk-s3/plugins/http_200_errors.rb @@ -42,7 +42,7 @@ def members_in_body?(output) def check_for_error(context) xml = context.http_response.body_contents - if xml.match(/\?>\n/) + if xml.match(/\?>\s*/) error_code = xml.match(/(.+?)<\/Code>/)[1] error_message = xml.match(/(.+?)<\/Message>/)[1] S3::Errors.error_class(error_code).new(context, error_message)