1.1 --- a/WebStack/Webware.py Sat Jan 29 23:34:57 2005 +0000
1.2 +++ b/WebStack/Webware.py Sat Feb 19 14:01:32 2005 +0000
1.3 @@ -22,8 +22,9 @@
1.4 "Initialise the transaction using the Webware transaction 'trans'."
1.5
1.6 self.trans = trans
1.7 + self.content_type = None
1.8 self.user = None
1.9 - self.content_type = None
1.10 + self.path_info = None
1.11
1.12 # Request-related methods.
1.13
1.14 @@ -138,12 +139,15 @@
1.15 handling the current request) from the request.
1.16 """
1.17
1.18 - path_info = self.trans.request().pathInfo()
1.19 - context_name = self.trans.request().contextName()
1.20 - if path_info.startswith(context_name):
1.21 - return path_info[len(context_name):]
1.22 + if self.path_info is not None:
1.23 + return self.path_info
1.24 else:
1.25 - return path_info
1.26 + path_info = self.trans.request().pathInfo()
1.27 + context_name = self.trans.request().contextName()
1.28 + if path_info.startswith(context_name):
1.29 + return path_info[len(context_name):]
1.30 + else:
1.31 + return path_info
1.32
1.33 def get_query_string(self):
1.34
1.35 @@ -406,18 +410,6 @@
1.36
1.37 self.trans.request().setSessionExpired(1)
1.38
1.39 - # Application-specific methods.
1.40 -
1.41 - def set_user(self, username):
1.42 -
1.43 - """
1.44 - An application-specific method which sets the user information with
1.45 - 'username' in the transaction. This affects subsequent calls to
1.46 - 'get_user'.
1.47 - """
1.48 -
1.49 - self.user = username
1.50 -
1.51 class Session:
1.52
1.53 "A more dictionary-like session object than the one Webware provides."