Sha256: 6df6ffb81cf1f3cfe75fd56d771b1b080b2248033d05db5eed02a45b38e0a2c7
Contents?: true
Size: 708 Bytes
Versions: 98
Compression:
Stored size: 708 Bytes
Contents
# frozen_string_literal: true module Aws module S3 module Plugins class GetBucketLocationFix < Seahorse::Client::Plugin class Handler < Seahorse::Client::Handler def call(context) @handler.call(context).on(200) do |response| response.data = S3::Types::GetBucketLocationOutput.new xml = context.http_response.body_contents matches = xml.match(/<LocationConstraint.*?>(.+?)<\/LocationConstraint>/) response.data[:location_constraint] = matches ? matches[1] : '' end end end handler(Handler, priority: 60, operations: [:get_bucket_location]) end end end end
Version data entries
98 entries across 98 versions & 1 rubygems