1.1 --- a/WebStack/ModPython.py Sat Feb 07 23:56:17 2004 +0000
1.2 +++ b/WebStack/ModPython.py Sun Feb 08 16:34:11 2004 +0000
1.3 @@ -6,6 +6,7 @@
1.4
1.5 import Generic
1.6 from mod_python.util import FieldStorage
1.7 +from mod_python import apache
1.8
1.9 class Transaction(Generic.Transaction):
1.10
1.11 @@ -18,6 +19,7 @@
1.12 "Initialise the transaction using the mod_python transaction 'trans'."
1.13
1.14 self.trans = trans
1.15 + self.response_code = apache.OK
1.16
1.17 # Request-related methods.
1.18
1.19 @@ -122,6 +124,24 @@
1.20
1.21 return self.trans
1.22
1.23 + def get_response_code(self):
1.24 +
1.25 + """
1.26 + Get the response code associated with the transaction. If no response
1.27 + code is defined, None is returned.
1.28 + """
1.29 +
1.30 + return self.response_code
1.31 +
1.32 + def set_response_code(self, response_code):
1.33 +
1.34 + """
1.35 + Set the 'response_code' using a numeric constant defined in the HTTP
1.36 + specification.
1.37 + """
1.38 +
1.39 + self.response_code = response_code
1.40 +
1.41 def set_content_type(self, content_type):
1.42
1.43 """