def parse_negotiation(value):
    """Parse Content Negotiation headers to list of value, quality tuples."""
    values = []
    for it in value.split(','):
        pair = it.split(';')
        if pair[0] == it:
            values.append((it, 1.0))
            continue
        try:
            quality = float(pair[1].split('=')[1])
        except (IndexError, ValueError):
            quality = 1.0
        values.append((pair[0], quality))
    return values
