def METHOD_NAME(header_lines):
    headers = {}
    for line in header_lines:
        if b':' in line:
            key, value = line.split(b':', 1)
            value = value.strip()
        else:
            key = line
            value = None
        key = key.decode('latin-1')
        key = key[0].upper() + key[1:].lower()
        if value:
            value = value.decode('latin-1')
        headers[key] = value
    return headers