def parse_content_type_header(content_type):
    """
    Parse and normalize request content type and return a tuple with the content type and the
    options.

    :rype: ``tuple``
    """
    if ";" in content_type:
        split = content_type.split(";")
        media = split[0]
        options = {}

        for pair in split[1:]:
            split_pair = pair.split("=", 1)

            if len(split_pair) != 2:
                continue

            key = split_pair[0].strip()
            value = split_pair[1].strip()

            options[key] = value
    else:
        media = content_type
        options = {}

    result = (media, options)
    return result

    Parse and normalize request content type and return a tuple with the content type and the
    options.

    :rype: ``tuple``
    
st2common/st2common/util/http.py