# HG changeset patch # User paulb # Date 1088791521 0 # Node ID dbdb94b01875bc913620f487b6978e377fbda28f # Parent b6d245b617b1adf1f04ce49a49fe0577e28fa118 [project @ 2004-07-02 18:05:21 by paulb] Fixed content type retrieval. diff -r b6d245b617b1 -r dbdb94b01875 examples/Common/Simple/__init__.py --- a/examples/Common/Simple/__init__.py Wed Jun 16 22:27:02 2004 +0000 +++ b/examples/Common/Simple/__init__.py Fri Jul 02 18:05:21 2004 +0000 @@ -14,6 +14,11 @@ # Get some information. out = trans.get_response_stream() + if trans.get_content_type(): + content_type = trans.get_content_type().content_type + charset = trans.get_content_type().charset + else: + content_type, charset = None, None out.write(""" @@ -70,8 +75,8 @@ trans.get_query_string(), trans.get_request_method(), trans.get_user(), - trans.get_content_type().content_type, - trans.get_content_type().charset, + content_type, + charset, self._format_dict(trans.get_headers()), self._format_list(trans.get_header_values("User-Agent")), self._format_list(trans.get_header_values("user-agent")),