@staticmethod
def clean_mime(mime):
    """
        Remove attributes from a mime string:
        >>> ContentTypeMiddleware.clean_mime(' text/html; charset=utf-8	 ')
        'text/html'
        """
    separator = mime.find(';')
    if separator > 0:
        mime = mime[:separator]
    return mime.strip()
