return the full response from FakeAppObject

Fixes bug 984042

Change-Id: I18a6eac497b24338af4d82a568484b0fc9d97382
This commit is contained in:
Ionuț Arțăriși 2012-04-17 18:27:38 +03:00
parent 40cbff9fd3
commit c82c719f93
2 changed files with 2 additions and 2 deletions

View File

@ -17,6 +17,7 @@ Contributors
------------ ------------
Jesse Andrews (anotherjesse@gmail.com) Jesse Andrews (anotherjesse@gmail.com)
Joe Arnold (joe@swiftstack.com) Joe Arnold (joe@swiftstack.com)
Ionuț Arțăriși (iartarisi@suse.cz)
Darrell Bishop (darrell@swiftstack.com) Darrell Bishop (darrell@swiftstack.com)
James E. Blair (james.blair@rackspace.com) James E. Blair (james.blair@rackspace.com)
Chmouel Boudjnah (chmouel@chmouel.com) Chmouel Boudjnah (chmouel@chmouel.com)

View File

@ -134,8 +134,7 @@ class FakeAppObject(FakeApp):
if 'HTTP_RANGE' in env: if 'HTTP_RANGE' in env:
resp = Response(body=self.object_body, resp = Response(body=self.object_body,
conditional_response=True) conditional_response=True)
resp_iter = iter(resp(env, start_response)) return resp(env, start_response)
return resp_iter.next()
start_response(Response().status, start_response(Response().status,
self.response_headers.items()) self.response_headers.items())
if env['REQUEST_METHOD'] == 'GET': if env['REQUEST_METHOD'] == 'GET':