renderers.py 文件源码

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

项目:plone.server 作者: plone 项目源码 文件源码
def __call__(self, value):
        # Safe html transformation
        if _is_pserver_response(value):
            body = value.response
            if not isinstance(body, bytes):
                if not isinstance(body, str):
                    body = json.dumps(value.response)
                body = body.encode('utf8')

            value = aioResponse(
                body=body, status=value.status,
                headers=value.headers)
        if 'content-type' not in value.headers:
            value.headers.update({
                'content-type': 'text/html'
            })
        return value
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号