'Return the headers that need to be included in the StringToSign
in their canonical form by converting all header keys to lower
case, sorting them in alphabetical order and then joining
them into a string, separated by newlines.'

def canonical_headers(self, headers_to_sign):

    l = sorted([('%s:%s' % (n.lower().strip(), headers_to_sign[n].strip())) for n in headers_to_sign])
    return '\n'.join(l)
