lib/mongo/auth/aws/request.rb
def headers_to_sign
          headers_to_sign = {}
          headers.keys.sort_by { |k| k.downcase }.each do |key|
            write_key = key.downcase
            headers_to_sign[write_key] = headers[key]
          end
          headers_to_sign
        end
# Returns the hash containing the headers of the calculated canonical
# request that should be signed, in a ready to sign form.
#
# The differences between #headers and this method is this method:
#
# - Removes any headers that are not to be signed. Per AWS
#   specifications it should be possible to sign all headers, but
#   MongoDB server expects only some headers to be signed and will
#   not form the correct request if other headers are signed.
# - Lowercases all header names.
# - Orders the headers lexicographically in the hash.
#
# @return [ <Hash> ] headers The headers.
Returns the hash containing the headers of the calculated canonical
request that should be signed, in a ready to sign form.

The differences between #headers and this method is this method.

Removes any headers that are not to be signed. Per AWS
specifications it should be possible to sign all headers, but
MongoDB server expects only some headers to be signed and will
not form the correct request if other headers are signed.
Lowercases all header names.
Orders the headers lexicographically in the hash.
Returns the hash containing the headers of the calculated canonical request that should be signed in a ready to sign form . The differences between #headers and this method is this method . Removes any headers that are not to be signed . Per AWS specifications it should be possible to sign all headers but MongoDB server expects only some headers to be signed and will not form the correct request if other headers are signed . Lowercases all header names . Orders the headers lexicographically in the hash .
def headers_to_sign
          headers_to_sign = {}
          headers.keys.sort_by { |k| k.downcase }.each do |key|
            write_key = key.downcase
            headers_to_sign[write_key] = headers[key]
          end
          headers_to_sign
        end
def headers_to_sign headers_to_sign = { } headers . keys . sort_by { | k | k . downcase } . each do | key | write_key = key . downcase headers_to_sign [ write_key ] = headers [ key ] end headers_to_sign end
Returns the hash containing the headers of the calculated canonical
request that should be signed, in a ready to sign form.
Returns the hash containing the headers of the calculated canonical request that should be signed in a ready to sign form .
headers The headers.
headers The headers .
 <Hash> 