def parse_mime_type(mime_type):
    parts = mime_type.split(";")
    params = dict([tuple([s.strip() for s in param.split("=")])\
            for param in parts[1:] ])
    full_type = parts[0].strip()
    # Java URLConnection class sends an Accept header that includes a single "*"
    # Turn it into a legal wildcard.
    if full_type == '*': full_type = '*/*'
    (type, subtype) = full_type.split("/")
    return (type.strip(), subtype.strip(), params)
Carves up a mime-type and returns a tuple of the
dataset/ETHPy150Open mozilla/inventory/vendor-local/src/mimeparse/mimeparse.py/parse_mime_type