Skip to content
This repository has been archived by the owner on Apr 4, 2019. It is now read-only.

Commit

Permalink
Merge pull request #76 from gcampionpae/master
Browse files Browse the repository at this point in the history
Updated the handling of content-type headers to be more generic
  • Loading branch information
Christoph Schabert committed Dec 13, 2017
2 parents 61e3efa + 7448315 commit 7e183d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lambda_utils/response_handlers/api_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def redirect_to(url, status=302):
def extract_body(event):
def content_type():
headers = event.get('headers', {})
for key in ['Content-Type', 'content-type']:
if key in headers:
for key in headers:
if key.lower() == 'content-type':
return headers[key]
return ''

Expand Down

0 comments on commit 7e183d6

Please sign in to comment.