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
b1779aaf
Commit
b1779aaf
authored
Apr 12, 2002
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- new env. variable LOG_ZPUBLISHER_TRACEBACK
(see doc/ENVIRONMENT.txt)
parent
8642647c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
4 deletions
+19
-4
doc/CHANGES.txt
doc/CHANGES.txt
+3
-0
doc/ENVIRONMENT.txt
doc/ENVIRONMENT.txt
+6
-0
lib/python/ZPublisher/HTTPResponse.py
lib/python/ZPublisher/HTTPResponse.py
+10
-4
No files found.
doc/CHANGES.txt
View file @
b1779aaf
...
...
@@ -73,6 +73,9 @@ Zope Changes
- New implementation of ZODB object cache.
- new env. variable LOG_ZPUBLISHER_TRACEBACK
(see doc/ENVIRONMENT.txt)
Bugs:
- Made repr of an HTTPRequest.record eval'able as a dict (Collector
...
...
doc/ENVIRONMENT.txt
View file @
b1779aaf
...
...
@@ -140,6 +140,12 @@ Debugging and Logging
Run Zope in debug mode if set. Same as -D options (z2.py)
LOG_ZPUBLISHER_TRACEBACK
If set, Zope will log all ZPublisher traceback through
the stupid logger. (Default: unset)
Misc.
Z_REALM "your realm"
...
...
lib/python/ZPublisher/HTTPResponse.py
View file @
b1779aaf
#############################################################################
#
#############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
...
...
@@ -12,10 +12,11 @@
##############################################################################
'''CGI Response Output formatter
$Id: HTTPResponse.py,v 1.5
7 2002/04/05 16:00:17 htrd
Exp $'''
__version__
=
'$Revision: 1.5
7
$'
[
11
:
-
2
]
$Id: HTTPResponse.py,v 1.5
8 2002/04/12 17:22:44 andreasjung
Exp $'''
__version__
=
'$Revision: 1.5
8
$'
[
11
:
-
2
]
import
types
,
os
,
sys
,
re
import
zLOG
from
string
import
translate
,
maketrans
from
types
import
StringType
,
InstanceType
,
LongType
,
UnicodeType
from
BaseResponse
import
BaseResponse
...
...
@@ -175,7 +176,8 @@ class HTTPResponse(BaseResponse):
if
type
(
status
)
is
types
.
StringType
:
status
=
status
.
lower
()
if
status_codes
.
has_key
(
status
):
status
=
status_codes
[
status
]
else
:
status
=
500
else
:
status
=
500
self
.
status
=
status
if
reason
is
None
:
if
status_reasons
.
has_key
(
status
):
reason
=
status_reasons
[
status
]
...
...
@@ -607,6 +609,10 @@ class HTTPResponse(BaseResponse):
(str(t), b + self._traceback(t,'
(
see
above
)
', tb, 0)),
is_error=1)
del tb
if os.environ.has_key('
LOG_ZPUBLISHER_TRACEBACK
'):
zLOG.LOG('
zpublisher
',zLOG.WARNING,'
Traceback
:
',body)
return body
_wrote=None
...
...
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