Fixing the way Response object handles sub items in some edge cases

+ Do it with the least impact on performance
This commit is contained in:
Karim shoair
2024-11-16 13:54:55 +02:00
parent 105ec5b067
commit 572df6b3b4
5 changed files with 19 additions and 11 deletions
+2 -2
View File
@@ -224,14 +224,14 @@ class PlaywrightEngine:
response = Response(
url=res.url,
text=page.content(),
content=res.body(),
body=res.body(),
status=res.status,
reason=res.status_text,
encoding=encoding,
cookies={cookie['name']: cookie['value'] for cookie in page.context.cookies()},
headers=res.all_headers(),
request_headers=res.request.all_headers(),
adaptor_arguments=self.adaptor_arguments
**self.adaptor_arguments
)
page.close()
return response