[Zope-Checkins] CVS: Zope/lib/python/ZPublisher - HTTPResponse.py:1.75

Brian Lloyd brian@zope.com
Mon, 28 Apr 2003 17:16:44 -0400


Update of /cvs-repository/Zope/lib/python/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv28297

Modified Files:
	HTTPResponse.py 
Log Message:
Fix issues with old bci (bobo call interface) headers.


=== Zope/lib/python/ZPublisher/HTTPResponse.py 1.74 => 1.75 ===
--- Zope/lib/python/ZPublisher/HTTPResponse.py:1.74	Thu Apr 17 13:41:57 2003
+++ Zope/lib/python/ZPublisher/HTTPResponse.py	Mon Apr 28 17:16:43 2003
@@ -691,15 +691,24 @@
             # Try to capture exception info for bci calls
             et = translate(str(t), nl2sp)
             self.setHeader('bobo-exception-type', et)
-            ev = translate(str(v), nl2sp)
-            if ev.find( '<html>') >= 0:
-                ev = 'bobo exception'
-            self.setHeader('bobo-exception-value', ev[:255])
+
+            # As of Zope 2.6.2 / 2.7, we no longer try to pass along a
+            # meaningful exception value. Now that there are good logging
+            # facilities on the server side (and given that xml-rpc has
+            # largely removed the need for this code at all), we just
+            # refer the caller to the server error log.
+            ev = 'See the server error log for details'
+            self.setHeader('bobo-exception-value', ev)
+
             # Get the tb tail, which is the interesting part:
             while tb.tb_next is not None:
                 tb = tb.tb_next
             el = str(tb.tb_lineno)
             ef = str(tb.tb_frame.f_code.co_filename)
+
+            # Do not give out filesystem information.
+            ef = ef.split(os.sep)[-1]
+
             self.setHeader('bobo-exception-file', ef)
             self.setHeader('bobo-exception-line', el)