http_handler.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:pyterrier 作者: dfurtado 项目源码 文件源码
def get_mime_type(self, path: str):
        """
        Returns the mime type base on the extension of the file that the
        client is requesting.

        path: The relative path to the static file. By default it will
        search in the static folder in the application root.
        """

        match = self._static_regex.search(path)

        if match is not None and match.group('ext') is not None:
            return mimetypes.types_map[match.group('ext')]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号