'Content-Type': self.content_type,
}
- for key, value in builtin_headers:
+ for key, value in builtin_headers.items():
if key in result:
raise Exception('Header "{}" defined twice'.format(key))
else:
return super().__new__(
cls,
content,
- content_type='text/html',
+ content_type='text/html; charset=utf-8',
**kwargs,
)
self = super().__new__(
cls,
content=json.dumps(content_json),
- content_type='application/json',
+ content_type='application/json; charset=utf-8',
**kwargs,
)
self.content_json = content_json
return super().__new__(
cls,
content,
- content_type='text/plain',
+ content_type='text/plain; charset=utf-8',
**kwargs,
)