Class: Aws::DynamoDB::Plugins::CRC32Validation::Handler

Inherits:
Seahorse::Client::Handler
  • Object
show all
Defined in:
lib/aws-sdk-dynamodb/plugins/crc32_validation.rb

Instance Method Summary collapse

Instance Method Details

#call(context) ⇒ Object


26
27
28
29
30
31
32
33
34
35
# File 'lib/aws-sdk-dynamodb/plugins/crc32_validation.rb', line 26

def call(context)
  # disable response gzipping - Net::HTTP unzips these responses
  # before we can see the body, making it impossible to verify
  # the CRC32 checksum against the compressed body stream
  context.http_request.headers['accept-encoding'] = ''

  @handler.call(context).on_success do |response|
    response.error = validate(context)
  end
end