mirror of
https://github.com/xcat2/confluent.git
synced 2026-03-06 06:19:32 +00:00
Fix response to wget and similar
If the client comes in without an HTTP_ACCEPT at all, do not trigger a trace.
This commit is contained in:
@@ -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', ''
|
||||
|
||||
Reference in New Issue
Block a user