web/request.py
changeset 6366 1806148d6ce8
parent 6353 b622602f8e9d
child 6543 66145280a7e6
--- a/web/request.py	Thu Sep 23 23:28:58 2010 +0200
+++ b/web/request.py	Wed Sep 29 16:16:32 2010 +0200
@@ -531,7 +531,7 @@
         """set output content type for this request. An optional filename
         may be given
         """
-        if content_type.startswith('text/'):
+        if content_type.startswith('text/') and ';charset=' not in content_type:
             content_type += ';charset=' + (encoding or self.encoding)
         self.set_header('content-type', content_type)
         if filename: