Skip to content

Commit

Permalink
Temporary fix for streaming body responses - load body to BytesIO obj…
Browse files Browse the repository at this point in the history
…ect.
  • Loading branch information
oselivanov committed Dec 30, 2015
1 parent 42d92ef commit 182d48d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aiobotocore/endpoint.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import io
import asyncio
import aiohttp
from aiohttp.client_reqrep import ClientResponse
Expand Down Expand Up @@ -25,7 +26,8 @@ def convert_to_response_dict(http_response, operation_model):
body = yield from http_response.read()
response_dict['body'] = body
elif operation_model.has_streaming_output:
response_dict['body'] = http_response.raw
body = yield from http_response.read()
response_dict['body'] = io.BytesIO(body)
else:
body = yield from http_response.read()
response_dict['body'] = body
Expand Down

0 comments on commit 182d48d

Please sign in to comment.