Class: Aws::S3::Plugins::Md5s

Inherits:
Seahorse::Client::Plugin
  • Object
show all
Defined in:
lib/aws-sdk-s3/plugins/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,
  :put_object_legal_hold,
  :put_object_lock_configuration,
  :put_object_retention
]

Instance Method Summary collapse

Instance Method Details

#add_handlers(handlers, config) ⇒ Object



69
70
71
72
73
74
75
76
77
# File 'lib/aws-sdk-s3/plugins/md5s.rb', line 69

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