Fixed choosing of response class based on body.

This commit is contained in:
Matvei Nazaruk 2016-05-19 22:24:37 +03:00
parent d3ced85ec3
commit 1bc9d35a87
1 changed files with 1 additions and 1 deletions

View File

@ -343,7 +343,7 @@ class ScrapyAgent(object):
txresponse, body, flags = result
status = int(txresponse.code)
headers = Headers(txresponse.headers.getAllRawHeaders())
respcls = responsetypes.from_args(headers=headers, url=url)
respcls = responsetypes.from_args(headers=headers, url=url, body=body)
return respcls(url=url, status=status, headers=headers, body=body, flags=flags)