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
5348fa86
Commit
5348fa86
authored
Nov 03, 1999
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bug in notFoundError - the HTTP status code was never set to 404
for not found errors :(
parent
ed30e915
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
lib/python/ZPublisher/HTTPResponse.py
lib/python/ZPublisher/HTTPResponse.py
+4
-2
No files found.
lib/python/ZPublisher/HTTPResponse.py
View file @
5348fa86
...
...
@@ -84,8 +84,8 @@
##############################################################################
'''CGI Response Output formatter
$Id: HTTPResponse.py,v 1.2
1 1999/09/23 22:01:50 jim
Exp $'''
__version__
=
'$Revision: 1.2
1
$'
[
11
:
-
2
]
$Id: HTTPResponse.py,v 1.2
2 1999/11/03 16:48:39 brian
Exp $'''
__version__
=
'$Revision: 1.2
2
$'
[
11
:
-
2
]
import
string
,
types
,
sys
,
regex
from
string
import
find
,
rfind
,
lower
,
upper
,
strip
,
split
,
join
,
translate
...
...
@@ -505,6 +505,7 @@ class HTTPResponse(BaseResponse):
</HTML>""")
def notFoundError(self,entry='who knows!'):
self.setStatus(404)
raise 'NotFound',self._error_html(
"
Resource
not
found
",
"
Sorry
,
the
requested
Zope
resource
does
not
exist
.
<
p
>
" +
...
...
@@ -521,6 +522,7 @@ class HTTPResponse(BaseResponse):
"
\
n
%
s
" % entry)
def badRequestError(self,name):
self.setStatus(400)
if regex.match('^[A-Z_0-9]+$',name) >= 0:
raise 'InternalError', self._error_html(
"
Internal
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