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
c996feb2
Commit
c996feb2
authored
Jun 21, 2006
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collector #2136: Map ResourceLockedError to the correct response code.
parent
0ab7976f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
0 deletions
+9
-0
doc/CHANGES.txt
doc/CHANGES.txt
+2
-0
lib/python/ZPublisher/HTTPResponse.py
lib/python/ZPublisher/HTTPResponse.py
+1
-0
lib/python/ZPublisher/tests/testHTTPResponse.py
lib/python/ZPublisher/tests/testHTTPResponse.py
+6
-0
No files found.
doc/CHANGES.txt
View file @
c996feb2
...
...
@@ -18,6 +18,8 @@ Zope Changes
Bugs fixed
- Collector #2136: Map ResourceLockedError to the correct response code.
- Collector #2016: DemoStorage couldn't wrap base storages without
an '_oid' attribute.
...
...
lib/python/ZPublisher/HTTPResponse.py
View file @
c996feb2
...
...
@@ -97,6 +97,7 @@ for name in en:
status_codes
[
'nameerror'
]
=
503
status_codes
[
'keyerror'
]
=
503
status_codes
[
'redirect'
]
=
300
status_codes
[
'resourcelockederror'
]
=
423
start_of_header_search
=
re
.
compile
(
'(<head[^>]*>)'
,
re
.
IGNORECASE
).
search
...
...
lib/python/ZPublisher/tests/testHTTPResponse.py
View file @
c996feb2
...
...
@@ -74,6 +74,12 @@ class HTTPResponseTests(unittest.TestCase):
response
.
appendHeader
(
'XXX'
,
'foo'
)
self
.
assertEqual
(
response
.
headers
.
get
(
'xxx'
),
'bar,
\
n
\
t
foo'
)
def
test_setStatus_ResourceLockedError
(
self
):
response
=
self
.
_makeOne
()
from
webdav.Lockable
import
ResourceLockedError
response
.
setStatus
(
ResourceLockedError
)
self
.
assertEqual
(
response
.
status
,
423
)
def
test_suite
():
suite
=
unittest
.
TestSuite
()
...
...
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