1.1 --- a/WebStack/ModPython.py Tue Aug 31 18:28:41 2004 +0000
1.2 +++ b/WebStack/ModPython.py Wed Sep 01 22:51:40 2004 +0000
1.3 @@ -170,7 +170,7 @@
1.4 body with fields found in the path.
1.5 """
1.6
1.7 - encoding = encoding or self.get_content_type().charset or "iso-8859-1"
1.8 + encoding = encoding or self.get_content_type().charset or self.default_charset
1.9
1.10 if self.storage_body is None:
1.11 self.storage_body = FieldStorage(self.trans, keep_blank_values=1)
1.12 @@ -232,12 +232,12 @@
1.13 Returns the response stream for the transaction.
1.14 """
1.15
1.16 - # Unicode can upset this operation. Using either the specified charset,
1.17 - # the same charset as that used in the request, or a default encoding.
1.18 + # Unicode can upset this operation. Using either the specified charset
1.19 + # or a default encoding.
1.20
1.21 - encoding = self.get_content_type().charset or "utf-8"
1.22 if self.content_type:
1.23 - encoding = self.content_type.charset or encoding
1.24 + encoding = self.content_type.charset
1.25 + encoding = encoding or self.default_charset
1.26 return ConvertingStream(self.trans, encoding)
1.27
1.28 def get_response_code(self):
1.29 @@ -275,7 +275,7 @@
1.30 # Remember the content type for encoding purposes later.
1.31
1.32 self.content_type = content_type
1.33 - self.trans.content_type = self.format_content_type(content_type)
1.34 + self.trans.content_type = str(content_type)
1.35
1.36 # Higher level response-related methods.
1.37