From 4ce3f10fc08a9c0395d63fea1be9bf2fd6a8bf9c Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 22 Mar 2022 12:37:43 +0800 Subject: [PATCH] bugfix --- ahserver/proxyProcessor.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ahserver/proxyProcessor.py b/ahserver/proxyProcessor.py index 21429bb..e22922c 100644 --- a/ahserver/proxyProcessor.py +++ b/ahserver/proxyProcessor.py @@ -30,16 +30,16 @@ class ProxyProcessor(BaseProcessor): allow_redirects=False, data=await request.read()) as res: headers = res.headers.copy() - # body = await res.read() - self.retResponse = web.Response( + body = await res.read() + self.retResponse = web.StreamResponse( headers = headers, status = res.status - # , body=body + body=body ) - await self.retResponse.prepare(request) + # await self.retResponse.prepare(request) async for chunk in res.content.iter_chunked(chunk_size): await self.retResponse.write(chunk) - print('proxy: datahandle() finish', self.retResponse) + print('proxy: datahandle() finish', self.res) def setheaders(self):