Class: Aws::Plugins::S3Md5s

Inherits:
Seahorse::Client::Plugin show all
Defined in:
lib/aws-sdk-core/plugins/s3_md5s.rb

Defined Under Namespace

Classes: Handler

Constant Summary collapse

REQUIRED_OPERATIONS =

Amazon S3 requires these operations to have an MD5 checksum

[
  :delete_objects,
  :put_bucket_cors,
  :put_bucket_lifecycle,
  :put_bucket_policy,
  :put_bucket_tagging,
]

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Plugin

#add_options, #after_initialize, after_initialize, after_initialize_hooks, before_initialize, #before_initialize, before_initialize_hooks, handlers, option, options

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response, #handler_for, #new_handler

Instance Method Details

#add_handlers(handlers, config) ⇒ Object



38
39
40
41
42
43
44
45
46
# File 'lib/aws-sdk-core/plugins/s3_md5s.rb', line 38

def add_handlers(handlers, config)
  # priority set low to ensure md5 is computed AFTER the request is
  # built but before it is signed
  handlers.add(Handler, {
    priority: 10,
    step: :build,
    operations: config.compute_checksums ? nil : REQUIRED_OPERATIONS,
  })
end