class Aws::Plugins::S3Md5s::Handler

@api private

def call(context)

def call(context)
  context.http_request.headers['Content-Md5'] = md5(context)
  @handler.call(context)
end

def md5(context)

def md5(context)
  md5 = Digest::MD5.new
  body = context.http_request.body
  while chunk = body.read(OneMB)
    md5.update(chunk)
  end
  body.rewind
  Base64.encode64(md5.digest).strip
end