Fixed choosing of response class based on body.

This commit is contained in:
Matvei Nazaruk 2016-05-19 22:24:37 +03:00 committed by Paul Tremberth
parent 1c34e491d6
commit 5e60d957e9
1 changed files with 1 additions and 1 deletions

View File

@ -347,7 +347,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)