def generateContentRange(tup):
    """tup is (rtype, start, end, rlen)
    rlen can be None.
    """
    rtype, start, end, rlen = tup
    if rlen == None:
        rlen = '*'
    else:
        rlen = int(rlen)
    if start == None and end == None:
        startend = '*'
    else:
        startend = '%d-%d' % (start, end)

    return '%s %s/%s' % (rtype, startend, rlen)