1.1 --- a/examples/Common/SimpleApplication/__init__.py Sun Feb 01 16:38:34 2004 +0000
1.2 +++ b/examples/Common/SimpleApplication/__init__.py Sun Feb 01 16:38:52 2004 +0000
1.3 @@ -10,7 +10,30 @@
1.4
1.5 def respond(self, trans):
1.6 trans.set_content_type(WebStack.Generic.ContentType("text/html"))
1.7 +
1.8 + # Get some information.
1.9 +
1.10 + path_info, path = "", ""
1.11 +
1.12 + try:
1.13 + path_info = trans.get_path_info()
1.14 + path = trans.get_path()
1.15 + except NotImplementedError:
1.16 + pass
1.17 +
1.18 out = trans.get_response_stream()
1.19 - out.write("<html><body><h1>Test</h1></body></html>")
1.20 + out.write("""
1.21 +<html>
1.22 + <body>
1.23 + <h1>Test</h1>
1.24 + <p>
1.25 + Path: %s
1.26 + </p>
1.27 + <p>
1.28 + Path info: %s
1.29 + </p>
1.30 + </body>
1.31 +</html>
1.32 +""" % (path, path_info))
1.33
1.34 # vim: tabstop=4 expandtab shiftwidth=4