1.1 --- a/WebStack/BaseHTTPRequestHandler.py Thu Nov 16 23:39:56 2006 +0000
1.2 +++ b/WebStack/BaseHTTPRequestHandler.py Thu Nov 16 23:40:10 2006 +0000
1.3 @@ -103,6 +103,18 @@
1.4 self.trans.end_headers()
1.5 self.trans.wfile.write(content)
1.6
1.7 + def rollback(self):
1.8 +
1.9 + """
1.10 + A special method, partially synchronising the transaction with
1.11 + framework-specific objects, but discarding previously emitted content
1.12 + that is to be replaced by an error message.
1.13 + """
1.14 +
1.15 + self.content = StringIO()
1.16 + self.headers_out = {}
1.17 + self.cookies_out = SimpleCookie()
1.18 +
1.19 # Server-related methods.
1.20
1.21 def get_server_name(self):