# HG changeset patch # User Alexandre Fayolle # Date 1285685565 -7200 # Node ID b622602f8e9dc951548609c48d3e7eafd30df655 # Parent 2259d834d757f5f97427cb23c3e186378cb8d8a3 don't add another encoding if already present in content-type diff -r 2259d834d757 -r b622602f8e9d web/request.py --- a/web/request.py Tue Sep 28 16:50:34 2010 +0200 +++ b/web/request.py Tue Sep 28 16:52:45 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: