def dict_from_string(dispstr):
    """
    Converts a string which contains a Content-Disposition
    header's contents into a dict.
    :param dispstr: String with Content-Disposition value
    :return: Dictionary of Content-Disposition values.
    """
    disp_parts = dispstr.split(';')
    disp_dict = {}
    for d_part in disp_parts:
        if len(d_part.split('=', 1)) > 1:
            disp_param_cleaned = list(map(str.strip, d_part.split('=', 1)))
            disp_dict[disp_param_cleaned[0]] = disp_param_cleaned[1]
        else:
            disp_dict[d_part.strip().lower()] = None
    return disp_dict
