def get_content_type(filename: str) ->str:
    """
    Retrieves a sensible content type for a file
    :param filename: The name of the file
    :return: The content type of the file
    """
    try:
        extension = filename.rsplit('.', 1)[1].lower()
        if extension == 'jar':
            return 'application/java-archive'
        elif extension == 'txt':
            return 'text/plain'
        else:
            return 'application/octet-stream'
    except IndexError:
        return 'application/octet-stream'
