Sha256: 4314ba28f9a9b3490da9e803dbe65c27b63dcf7a3ca4acd6cc2133bb0ecf35c7

Contents?: true

Size: 655 Bytes

Versions: 100

Compression:

Stored size: 655 Bytes

Contents

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>/)
              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

100 entries across 100 versions & 1 rubygems

Version Path
aws-sdk-s3-1.68.1 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.67.1 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.67.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.66.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.65.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.64.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.63.1 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.63.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.62.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.61.2 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.61.1 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.61.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.60.2 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.60.1 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.60.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.59.1 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.59.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.58.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.57.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
aws-sdk-s3-1.56.0 lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb