def _parse_response(header_data, ignore_bad_cookies=False,
                    ignore_bad_attributes=True):
    """Turn one or more lines of 'Set-Cookie:' header data into a list of dicts
    mapping attribute names to attribute values (as plain strings).
    """
    cookie_dicts = []
    for line in Definitions.EOL.split(header_data.strip()):
        if not line:
            break
        cookie_dict = parse_one_response(
            line, ignore_bad_cookies=ignore_bad_cookies,
            ignore_bad_attributes=ignore_bad_attributes)
        if not cookie_dict:
            continue
        cookie_dicts.append(cookie_dict)
    if not cookie_dicts:
        if not ignore_bad_cookies:
            raise InvalidCookieError(data=header_data)
        _report_invalid_cookie(header_data)
    return cookie_dicts