def prepare_headers(self, headers):
    'Prepares the given HTTP headers.'
    self.headers = CaseInsensitiveDict()
    if headers:
        for header in headers.items():
            check_header_validity(header)
            (name, value) = header
            self.headers[to_native_string(name)] = value
Prepares the given HTTP headers.
def prepare_headers(self, headers):
    
    self.headers = CaseInsensitiveDict()
    if headers:
        for header in headers.items():
            check_header_validity(header)
            (name, value) = header
            self.headers[to_native_string(name)] = value