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

Version Path
aws-sdk-s3-1.173.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.172.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.171.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.170.1 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.170.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.169.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.168.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.167.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.166.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.165.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.164.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.163.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.162.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.161.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.160.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.159.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.158.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.157.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.156.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.155.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb