changeset 27 | f81da251d0aa |
parent 26 | d5b6908e4da5 |
child 30 | 81d408373dde |
--- a/web/ldt/ldt_utils/views.py Thu Jun 10 20:49:13 2010 +0200 +++ b/web/ldt/ldt_utils/views.py Fri Jun 11 00:17:30 2010 +0200 @@ -207,7 +207,9 @@ if mimetype is None: mimetype = "application/json; charset=utf-8" else: - mimetype.encode("utf-8") + mimetype = mimetype.encode("utf-8") + if "charset" not in mimetype: + mimetype += "; charset=utf-8" resp = HttpResponse(mimetype=mimetype) resp['Cache-Control']='no-cache, must-revalidate' resp['Pragma']='no-cache'