File: charset.patch

package info (click to toggle)
python-restless 2.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 500 kB
  • sloc: python: 2,029; makefile: 149
file content (19 lines) | stat: -rw-r--r-- 652 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: add charset to Response constructor
Author: W. Martin Borgert <debacle@debian.org>
Origin: vendor
Bug-Debian: https://bugs.debian.org/880838
Last-Update: 2017-11-12
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/restless/pyr.py
+++ b/restless/pyr.py
@@ -34,7 +34,8 @@
             content_type = 'text/plain'
         else:
             content_type = 'application/json'
-        resp = Response(data, status_code=status, content_type=content_type)
+        resp = Response(data, status_code=status, content_type=content_type,
+                        charset='UTF-8')
         return resp
 
     @classmethod