Browse Source

Encode Unicode to raw bytes for server responses

tags/nilmdb-2.0.0
Jim Paris 4 years ago
parent
commit
911d9bc284
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      nilmdb/server/server.py

+ 5
- 0
nilmdb/server/server.py View File

@@ -456,6 +456,11 @@ class Server(object):
app_config.update({ 'tools.json_in.force': False,
'tools.json_in.processor': json_to_request_params })

# Convert Unicode strings to raw bytes on output
app_config.update({ 'tools.encode.text_only': True,
'tools.encode.on': True,
'tools.encode.encoding': 'utf-8' })

# Send tracebacks in error responses. They're hidden by the
# error_page function for client errors (code 400-499).
app_config.update({ 'request.show_tracebacks' : True })


Loading…
Cancel
Save