def parse_content_type(value):
    """
    Parse out the content type from a content type header.

    >>> parse_content_type('application/json; charset=utf8')
    'application/json'

    """
    if not value:
        return ''
    return value.split(';')[0].strip()
