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
541b872d
Commit
541b872d
authored
Mar 18, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for __bobo_hide_tracebacks__.
parent
6464f239
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
lib/python/ZPublisher/Response.py
lib/python/ZPublisher/Response.py
+6
-4
No files found.
lib/python/ZPublisher/Response.py
View file @
541b872d
...
...
@@ -3,7 +3,7 @@
__doc__
=
'''CGI Response Output formatter
$Id: Response.py,v 1.2
8 1998/03/13 22:13:35
jim Exp $'''
$Id: Response.py,v 1.2
9 1998/03/18 20:21:18
jim Exp $'''
# Copyright
#
# Copyright 1996 Digital Creations, L.C., 910 Princess Anne
...
...
@@ -53,7 +53,7 @@ $Id: Response.py,v 1.28 1998/03/13 22:13:35 jim Exp $'''
# Digital Creations, info@Digicool.com
# (540) 371-6909
#
__version__
=
'$Revision: 1.2
8
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
9
$'
[
11
:
-
2
]
import
string
,
types
,
sys
,
regex
,
regsub
from
string
import
find
,
rfind
,
lower
,
upper
,
strip
,
split
,
join
...
...
@@ -149,6 +149,8 @@ absuri_re=regex.compile("[a-zA-Z0-9+.-]+:[^\0- \"\#<>]+\(#[^\0- \"\#<>]*\)?")
bogus_str
=
regex
.
compile
(
" [a-fA-F0-9]+>$"
)
accumulate_header
=
{
'set-cookie'
:
1
}.
has_key
_tbopen
,
_tbclose
=
'<!--'
,
'-->'
class
Response
:
"""
\
An object representation of an HTTP response.
...
...
@@ -251,7 +253,7 @@ class Response:
bogus_str
.
search
(
body
)
>
0
):
raise
'NotFound'
,
(
"Sorry, the requested document does not exist.<p>"
"
\
n
<!--
\
n
%s
\
n
-->"
%
body
[
1
:
-
1
]
)
"
\
n
%s
\
n
%s
\
n
%s"
%
(
_tbopen
,
body
[
1
:
-
1
],
_tbclose
)
)
if
(
title
):
self
.
body
=
(
'<html>
\
n
<head>
\
n
<title>%s</title>
\
n
</head>
\
n
'
...
...
@@ -406,7 +408,7 @@ class Response:
tb
=
self
.
format_exception
(
t
,
v
,
tb
,
200
)
tb
=
join
(
tb
,
'
\
n
'
)
tb
=
self
.
quoteHTML
(
tb
)
return
"
\
n
<!--
\
n
%s
\
n
-->"
%
tb
return
"
\
n
%s
\
n
%s
\
n
%s"
%
(
_tbopen
,
tb
,
_tbclose
)
def
redirect
(
self
,
location
):
"""Cause a redirection without raising an error"""
...
...
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