You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

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

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

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Handler

#handler

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Handler

#initialize, #inspect

Constructor Details

This class inherits a constructor from Seahorse::Client::Handler

Instance Method Details

#call(context) ⇒ Object



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

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