Sha256: 7c0eedddf8c27a87ff1fc3048d1bdb203fee828a00106a5e42ccd879cba07f5c

Contents?: true

Size: 692 Bytes

Versions: 41

Compression:

Stored size: 692 Bytes

Contents

# frozen_string_literal: true

module Aws
  module S3
    module Plugins
      class Expect100Continue < Seahorse::Client::Plugin

        def add_handlers(handlers, config)
          if config.http_continue_timeout && config.http_continue_timeout > 0
            handlers.add(Handler)
          end
        end

        # @api private
        class Handler < Seahorse::Client::Handler

          def call(context)
            body = context.http_request.body
            if body.respond_to?(:size) && body.size > 0
              context.http_request.headers['expect'] = '100-continue'
            end
            @handler.call(context)
          end

        end
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
aws-sdk-s3-1.102.0 lib/aws-sdk-s3/plugins/expect_100_continue.rb
aws-sdk-s3-1.101.0 lib/aws-sdk-s3/plugins/expect_100_continue.rb
aws-sdk-s3-1.100.0 lib/aws-sdk-s3/plugins/expect_100_continue.rb
aws-sdk-s3-1.99.0 lib/aws-sdk-s3/plugins/expect_100_continue.rb
aws-sdk-s3-1.98.0 lib/aws-sdk-s3/plugins/expect_100_continue.rb
aws-sdk-s3-1.97.0 lib/aws-sdk-s3/plugins/expect_100_continue.rb
aws-sdk-s3-1.96.2 lib/aws-sdk-s3/plugins/expect_100_continue.rb
aws-sdk-s3-1.96.1 lib/aws-sdk-s3/plugins/expect_100_continue.rb
aws-sdk-s3-1.96.0 lib/aws-sdk-s3/plugins/expect_100_continue.rb
aws-sdk-s3-1.95.1 lib/aws-sdk-s3/plugins/expect_100_continue.rb
aws-sdk-s3-1.95.0 lib/aws-sdk-s3/plugins/expect_100_continue.rb
aws-sdk-s3-1.94.1 lib/aws-sdk-s3/plugins/expect_100_continue.rb
aws-sdk-s3-1.94.0 lib/aws-sdk-s3/plugins/expect_100_continue.rb
aws-sdk-s3-1.93.1 lib/aws-sdk-s3/plugins/expect_100_continue.rb
aws-sdk-s3-1.93.0 lib/aws-sdk-s3/plugins/expect_100_continue.rb
aws-sdk-s3-1.92.0 lib/aws-sdk-s3/plugins/expect_100_continue.rb
aws-sdk-s3-1.91.0 lib/aws-sdk-s3/plugins/expect_100_continue.rb
aws-sdk-s3-1.90.0 lib/aws-sdk-s3/plugins/expect_100_continue.rb
aws-sdk-s3-1.89.0 lib/aws-sdk-s3/plugins/expect_100_continue.rb
aws-sdk-s3-1.88.2 lib/aws-sdk-s3/plugins/expect_100_continue.rb