'Return the expected mimetype for the specified file name based on its extension.'

def guess_type(self, name):

    ans = guess_type(name)
    if (ans == u'text/html'):
        ans = u'application/xhtml+xml'
    if ((ans in {u'application/x-font-truetype', u'application/vnd.ms-opentype'}) and (self.opf_version_parsed[:2] > (3, 0))):
        return u'application/font-sfnt'
    return ans
