awsgi
awsgi copied to clipboard
headers not treated as case-insensitive (Content-Type)
In "use_binary_response", the header 'Content-Type' is read; however, HTTP headers are case insensitive (it fails in my case).
Can be fixed with something like this:
content_type = None
for item in headers.items():
if item[0].lower() == 'content-type':
content_type = item[1]
break