http.py 文件源码

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

项目:lifesoundtrack 作者: MTG 项目源码 文件源码
def process_response(self, request, response):
        response['Date'] = http_date()
        if not response.streaming and not response.has_header('Content-Length'):
            response['Content-Length'] = str(len(response.content))

        etag = response.get('ETag')
        last_modified = response.get('Last-Modified')
        if last_modified:
            last_modified = parse_http_date_safe(last_modified)

        if etag or last_modified:
            return get_conditional_response(
                request,
                etag=etag,
                last_modified=last_modified,
                response=response,
            )

        return response
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号