# HG changeset patch
# User paulb
# Date 1076861143 0
# Node ID fe25e2bf385a87d3da57b7f421b642b887a5a856
# Parent 7bb5468759983d7cd8b212a48c99ae0b2b9ea389
[project @ 2004-02-15 16:05:43 by paulb]
Added a test of the improved header retrieval support.
diff -r 7bb546875998 -r fe25e2bf385a examples/Common/Simple/__init__.py
--- a/examples/Common/Simple/__init__.py Sun Feb 15 16:05:35 2004 +0000
+++ b/examples/Common/Simple/__init__.py Sun Feb 15 16:05:43 2004 +0000
@@ -16,6 +16,9 @@
out = trans.get_response_stream()
out.write("""
+
+ Simple Example
+
Test
@@ -24,6 +27,21 @@
- Request method: %s
- Content type: %s
- Charset: %s
+ - Headers:
+
+ %s
+
+
+ - User-Agent:
+
+
+ - user-agent:
+
+
@@ -33,6 +51,9 @@
trans.get_request_method(),
trans.get_content_type().content_type,
trans.get_content_type().charset,
+ "".join(["%s%s" % (key, value) for key, value in trans.get_headers().items()]),
+ "".join(["%s" % value for value in trans.get_header_values("User-Agent")]),
+ "".join(["%s" % value for value in trans.get_header_values("user-agent")]),
))
# vim: tabstop=4 expandtab shiftwidth=4