Skip to content

Commit 869727f

Browse files
author
Alexander Smishlajev
committed
initialize self.charset early to enable html output for tracebacks...
...occurring before determine_charset() call.
1 parent 02aebdb commit 869727f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

roundup/cgi/client.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: client.py,v 1.207 2004-11-22 09:12:02 a1s Exp $
1+
# $Id: client.py,v 1.208 2004-11-22 10:46:18 a1s Exp $
22

33
"""WWW request handler (also used in the stand-alone server).
44
"""
@@ -150,6 +150,9 @@ def __init__(self, instance, request, env, form=None, translator=None):
150150
self.additional_headers = {}
151151
self.response_code = 200
152152

153+
# default character set
154+
self.charset = self.STORAGE_CHARSET
155+
153156
# parse cookies (used in charset and session lookups)
154157
self.cookie = Cookie.SimpleCookie(self.env.get('HTTP_COOKIE', ''))
155158

@@ -315,8 +318,6 @@ def determine_charset(self):
315318
If the charset is found, and differs from the storage charset,
316319
recode all form fields of type 'text/plain'
317320
"""
318-
# default to storage charset
319-
self.charset = self.STORAGE_CHARSET
320321

321322
# look for client charset
322323
charset_parameter = 0

0 commit comments

Comments
 (0)