2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-17 21:23:18 +00:00

Merge branch 'jjohnson42-fixwget'

This commit is contained in:
Jarrod Johnson 2016-01-28 10:19:17 -05:00
commit 0b51edde97

View File

@ -264,7 +264,7 @@ def _pick_mimetype(env):
return 'application/json; charset=utf-8', '.json'
elif env['PATH_INFO'].endswith('.html'):
return 'text/html', '.html'
elif 'application/json' in env['HTTP_ACCEPT']:
elif 'HTTP_ACCEPT' in env and 'application/json' in env['HTTP_ACCEPT']:
return 'application/json; charset=utf-8', ''
else:
return 'text/html', ''