def parse_cookie_data(data):
    """ Parse cookie data into key-value pairs """
    cookies = {}
    for c in data.split('; '):
        try:
            (k, v) = c.split('=')
            cookies[k] = v
        except ValueError:
            pass
    return cookies