From d0e5245fba993659a58bc6d2a5bb6fe9f625bbf0 Mon Sep 17 00:00:00 2001 From: samus_ Date: Thu, 8 Jan 2009 18:29:33 +0000 Subject: [PATCH] fixed bug --HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40688 --- scrapy/trunk/scrapy/http/response.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scrapy/trunk/scrapy/http/response.py b/scrapy/trunk/scrapy/http/response.py index b91d64186..aab874669 100644 --- a/scrapy/trunk/scrapy/http/response.py +++ b/scrapy/trunk/scrapy/http/response.py @@ -80,8 +80,11 @@ class Response(object) : kw.get('url', self.url), original_url=kw.get('original_url', self.original_url), headers=kw.get('headers', sameheaders()), - status=kw.get('status', self.status)) - newresp.body = kw.get('body', samebody()) + status=kw.get('status', self.status), + body=kw.get('body')) + # Response.__init__ forbids the use of ResponseBody instances + if 'body' not in kw: + newresp.body = samebody() return newresp def to_string(self):