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
e349be29
Commit
e349be29
authored
Mar 31, 2000
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added str of status codes to status code table so we can:
raise '123', 'blah' and get a return status of 123.
parent
87dbc148
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
lib/python/ZPublisher/HTTPResponse.py
lib/python/ZPublisher/HTTPResponse.py
+3
-2
No files found.
lib/python/ZPublisher/HTTPResponse.py
View file @
e349be29
...
...
@@ -84,8 +84,8 @@
##############################################################################
'''CGI Response Output formatter
$Id: HTTPResponse.py,v 1.2
5 2000/02/14 18:44:22 amos
Exp $'''
__version__
=
'$Revision: 1.2
5
$'
[
11
:
-
2
]
$Id: HTTPResponse.py,v 1.2
6 2000/03/31 17:11:33 jim
Exp $'''
__version__
=
'$Revision: 1.2
6
$'
[
11
:
-
2
]
import
string
,
types
,
sys
,
regex
from
string
import
find
,
rfind
,
lower
,
upper
,
strip
,
split
,
join
,
translate
...
...
@@ -150,6 +150,7 @@ for key, val in status_reasons.items():
status_codes
[
lower
(
join
(
split
(
val
,
' '
),
''
))]
=
key
status_codes
[
lower
(
val
)]
=
key
status_codes
[
key
]
=
key
status_codes
[
str
(
key
)]
=
key
en
=
filter
(
lambda
n
:
n
[
-
5
:]
==
'Error'
,
dir
(
__builtins__
))
for
name
in
map
(
lower
,
en
):
status_codes
[
name
]
=
500
...
...
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