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

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


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

Modified Files:
      Tag: Zope-2_6-branch
	HTTPResponse.py 
Log Message:
Fix issues with old bobo-call-interface headers.


=== Zope/lib/python/ZPublisher/HTTPResponse.py 1.69.4.3 => 1.69.4.4 ===
--- Zope/lib/python/ZPublisher/HTTPResponse.py:1.69.4.3	Sun Dec 22 12:39:02 2002
+++ Zope/lib/python/ZPublisher/HTTPResponse.py	Mon Apr 28 17:16:17 2003
@@ -687,15 +687,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)