'Read headers from a Python 2 httplib message object.'

@classmethod
def from_httplib(cls, message):

    headers = []
    for line in message.headers:
        if line.startswith(('    ', ' DCTB ')):
            (key, value) = headers[(-1)]
            headers[(-1)] = (key, ((value + '\r\n') + line.rstrip()))
            continue
        (key, value) = line.split(':', 1)
        headers.append((key, value.strip()))
    return cls(headers)
