1.1 --- a/examples/Common/Simple/__init__.py Wed Jun 16 22:27:02 2004 +0000
1.2 +++ b/examples/Common/Simple/__init__.py Fri Jul 02 18:05:21 2004 +0000
1.3 @@ -14,6 +14,11 @@
1.4 # Get some information.
1.5
1.6 out = trans.get_response_stream()
1.7 + if trans.get_content_type():
1.8 + content_type = trans.get_content_type().content_type
1.9 + charset = trans.get_content_type().charset
1.10 + else:
1.11 + content_type, charset = None, None
1.12 out.write("""
1.13 <html>
1.14 <head>
1.15 @@ -70,8 +75,8 @@
1.16 trans.get_query_string(),
1.17 trans.get_request_method(),
1.18 trans.get_user(),
1.19 - trans.get_content_type().content_type,
1.20 - trans.get_content_type().charset,
1.21 + content_type,
1.22 + charset,
1.23 self._format_dict(trans.get_headers()),
1.24 self._format_list(trans.get_header_values("User-Agent")),
1.25 self._format_list(trans.get_header_values("user-agent")),