':return: A string representation of the headers.'

def dump_headers(self, ignore_headers=()):

    try:
        headers = self.get_all_headers()
    except AttributeError:
        headers = self.get_headers()
    for header_name in ignore_headers:
        try:
            headers.idel(header_name)
        except KeyError:
            continue
    return unicode(headers)
