Skip to content

Commit

Permalink
install content-type if not present
Browse files Browse the repository at this point in the history
  • Loading branch information
nickolai-dr committed Jun 1, 2015
1 parent 59bb65c commit 401e88e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions aiobotocore/endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,16 @@ def _request(self, method, url, headers, data):

@asyncio.coroutine
def _send_request(self, request_dict, operation_model):
# TODO: fix this
request_dict['headers']['CONTENT-TYPE'] = 'application/octet-stream'

# install content-type header if not provided
headers = request_dict['headers']
for key in headers.keys():
if key.lower().startswith('content-type'):
break
else:
request_dict['headers']['Content-Type'] = \
'application/octet-stream'

attempts = 1
request = self.create_request(request_dict, operation_model)
success_response, exception = yield from self._get_response(
Expand Down

0 comments on commit 401e88e

Please sign in to comment.