def _finalize(self, response):
if self.stream and not is_json_response(response):
text = flask.stream_with_context(
stream_response(response))
else:
text = response.text
final_response = flask.Response(
text,
response.status_code,
headers=self._prepare_headers(response.headers, fix_case=True)
)
LOG.info(format_for_log(title='Response from proxy',
status_code=final_response.status_code,
headers=dict(final_response.headers)))
return final_response
评论列表
文章目录