def decode_body(content_type, response):
    """Headers: A dict of key value
       Content: str

       returns files dict filename: body
       """
    if not content_type.startswith("multipart/mixed"):
        raise ValueError("Invalid content type")

    boundary = content_type.split("boundary=")[1]
    #charset = _parse_value_in_header(content_type, "charset")

    body_content = []
    for content in response.iter_content(2 * (1024 ** 2)):
        body_content.append(content)
    body_content = "".join(body_content)

    if not body_content.startswith("--%s" % boundary):
        raise ValueError("Invalid body")

    files = {}

    body_file_chuncks = body_content.split("--%s\n" % boundary)
    for body_file_chunk in body_file_chuncks[1:-2]:  # First is a \n, last 2 too
        headers, file_body = _parse_file_chunk(body_file_chunk)
        try:
            content_disposition = headers["content-disposition"]
        except __HOLE__:
            raise ValueError("Invalid file headers, Content-disposition not found")
        filename = content_disposition.split('filename="')[1][:-1]
        files[filename] = file_body

    return files
dataset/ETHPy150Open conan-io/conan/conans/client/rest/multipart_decode.py/decode_body