diff roundup/cgi/client.py @ 2947:e611be5ee6c4

initialize self.charset early to enable html output for tracebacks... ...occurring before determine_charset() call.
author Alexander Smishlajev <a1s@users.sourceforge.net>
date Mon, 22 Nov 2004 10:46:18 +0000
parents 661028d24cd2
children deda13909085
line wrap: on
line diff
--- a/roundup/cgi/client.py	Mon Nov 22 09:12:02 2004 +0000
+++ b/roundup/cgi/client.py	Mon Nov 22 10:46:18 2004 +0000
@@ -1,4 +1,4 @@
-# $Id: client.py,v 1.207 2004-11-22 09:12:02 a1s Exp $
+# $Id: client.py,v 1.208 2004-11-22 10:46:18 a1s Exp $
 
 """WWW request handler (also used in the stand-alone server).
 """
@@ -150,6 +150,9 @@
         self.additional_headers = {}
         self.response_code = 200
 
+        # default character set
+        self.charset = self.STORAGE_CHARSET
+
         # parse cookies (used in charset and session lookups)
         self.cookie = Cookie.SimpleCookie(self.env.get('HTTP_COOKIE', ''))
 
@@ -315,8 +318,6 @@
         If the charset is found, and differs from the storage charset,
         recode all form fields of type 'text/plain'
         """
-        # default to storage charset
-        self.charset = self.STORAGE_CHARSET
 
         # look for client charset
         charset_parameter = 0

Roundup Issue Tracker: http://roundup-tracker.org/