Sha256: f319273f03c79455a468a7eb2fb2285fa54976ec490ea07b5a44ca0936b00975

Contents?: true

Size: 639 Bytes

Versions: 4

Compression:

Stored size: 639 Bytes

Contents

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)
            if context.http_request.body && context.http_request.body.size > 0
              context.http_request.headers['expect'] = '100-continue'
            end
            @handler.call(context)
          end

        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
aws-sdk-s3-1.68.1 lib/aws-sdk-s3/plugins/expect_100_continue.rb
aws-sdk-s3-1.67.1 lib/aws-sdk-s3/plugins/expect_100_continue.rb
aws-sdk-s3-1.67.0 lib/aws-sdk-s3/plugins/expect_100_continue.rb
aws-sdk-s3-1.66.0 lib/aws-sdk-s3/plugins/expect_100_continue.rb