1.1 --- a/WebStack/Webware.py Sun Feb 29 00:20:19 2004 +0000
1.2 +++ b/WebStack/Webware.py Wed Mar 10 23:41:02 2004 +0000
1.3 @@ -6,6 +6,7 @@
1.4
1.5 import Generic
1.6 from cgi import parse_qs
1.7 +import StringIO
1.8
1.9 class Transaction(Generic.Transaction):
1.10
1.11 @@ -28,8 +29,16 @@
1.12 the transaction.
1.13 """
1.14
1.15 - stream = self.trans.request().rawInput(rewind=1)
1.16 - if stream is None:
1.17 + request = self.trans.request()
1.18 + try:
1.19 + stream = request.rawInput(rewind=1)
1.20 + if stream is None:
1.21 + return StringIO.StringIO("")
1.22 +
1.23 + # NOTE: Dubious catch-all situation, but it is difficult to control
1.24 + # NOTE: cases where Webware's internals themselves fail.
1.25 +
1.26 + except:
1.27 return StringIO.StringIO("")
1.28
1.29 return stream