Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
3a9541f7
Commit
3a9541f7
authored
Apr 28, 2003
by
Brian Lloyd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issues with old bci (bobo call interface) headers.
parent
0c48ab0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
lib/python/ZPublisher/HTTPResponse.py
lib/python/ZPublisher/HTTPResponse.py
+15
-6
No files found.
lib/python/ZPublisher/HTTPResponse.py
View file @
3a9541f7
...
...
@@ -12,8 +12,8 @@
##############################################################################
'''CGI Response Output formatter
$Id: HTTPResponse.py,v 1.7
4 2003/04/17 17:41:57 fdrake
Exp $'''
__version__
=
'$Revision: 1.7
4
$'
[
11
:
-
2
]
$Id: HTTPResponse.py,v 1.7
5 2003/04/28 21:16:43 Brian
Exp $'''
__version__
=
'$Revision: 1.7
5
$'
[
11
:
-
2
]
import
types
,
os
,
sys
,
re
import
zlib
,
struct
...
...
@@ -691,15 +691,24 @@ class HTTPResponse(BaseResponse):
# 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)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment