Commit fd73aa1e authored by Chris McDonough's avatar Chris McDonough

Revert code that fixed litmus cond_put_corrupt_token and fail_cond_put_unlock...

Revert code that fixed litmus cond_put_corrupt_token and fail_cond_put_unlock tests, because the fix broke (the more important) lock_collection test.

Add a description of the current litmus failures in webdav/litmus-results.txt.
parent 905d14bc
......@@ -97,19 +97,6 @@ Zope Changes
Bugs Fixed
- DAV: litmus' cond_put_unlocked test (#22) exposed a bug in
webdav.Resource.dav__simpleifhandler. If the resource is not
locked, and a DAV request contains an If header, no token can
possibly match and we must return a 412 Precondition Failed
instead of 204 No Content.
- DAV: litmus' cond_put_corrupt_token test (#18) exposed a bug
in webdav.Resource.dav__simpleifhandler. If the resource is
locked at all, and a DAV request contains an If header, and
none of the lock tokens present in the header match a lock on
the resource, we need to return a 423 Locked instead of 204 No
Content.
- DAV: litmus "notowner_modify" tests warn during a MOVE request
because we returned "412 Precondition Failed" instead of "423
Locked" when the resource attempting to be moved was itself
......@@ -262,6 +249,9 @@ Zope Changes
- Returned to the "classic" './configure && make && make install'
recipe, dropping the use of 'zpkg' for building Zope2 releases.
- Added lib/python/webdav/litmus-results.txt explaining current
test results from the litmus WebDAV torture test.
Zope 2.10.0 beta 1 (2006/05/30)
Restructuring
......
......@@ -127,13 +127,6 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem):
if not ifhdr:
return None
if (not locked):
# we have an if header but the resource isn't locked, we
# can shortcut checking the tags in the if header; no token
# can possibly match
raise PreconditionFailed(
'Resource not locked but If header specified')
# Since we're a simple if handler, and since some clients don't
# pass in the port information in the resource part of an If
# header, we're only going to worry about if the paths compare
......@@ -172,12 +165,12 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem):
for token in wehave: self.wl_getLock(token).refresh()
found = 1; break
if resourcetagged and found:
if resourcetagged and (not found):
raise PreconditionFailed, 'Condition failed.'
elif resourcetagged and found:
return 1
if (not resourcetagged) and (not found):
raise Locked('Resource locked and no recognized lock tokens in '
'If header')
raise PreconditionFailed('Condition failed')
else:
return 0
# WebDAV class 1 support
security.declareProtected(View, 'HEAD')
......
......@@ -56,13 +56,17 @@ class TestResource(unittest.TestCase):
from webdav.common import Locked
self.assertRaises(Locked, inst.MOVE, request, response)
def test_dav__simpleifhandler_fail_cond_put_unlocked(self):
def dont_test_dav__simpleifhandler_fail_cond_put_unlocked(self):
"""
DAV: litmus' cond_put_unlocked test (#22) exposed a bug in
webdav.Resource.dav__simpleifhandler. If the resource is not
locked, and a DAV request contains an If header, no token can
possibly match and we must return a 412 Precondition Failed
instead of 204 No Content.
I (chrism) haven't been able to make this work properly
without breaking other litmus tests (32. lock_collection being
the most important), so this test is not currently running.
"""
ifhdr = 'If: (<locktoken:foo>)'
request = DummyRequest({'URL':'http://example.com/foo/PUT'},
......@@ -76,7 +80,7 @@ class TestResource(unittest.TestCase):
self.assertRaises(PreconditionFailed, inst.dav__simpleifhandler,
request, response)
def test_dav__simpleifhandler_cond_put_corrupt_token(self):
def dont_test_dav__simpleifhandler_cond_put_corrupt_token(self):
"""
DAV: litmus' cond_put_corrupt_token test (#18) exposed a bug
in webdav.Resource.dav__simpleifhandler. If the resource is
......@@ -84,6 +88,10 @@ class TestResource(unittest.TestCase):
none of the lock tokens present in the header match a lock on
the resource, we need to return a 423 Locked instead of 204 No
Content.
I (chrism) haven't been able to make this work properly
without breaking other litmus tests (32. lock_collection being
the most important), so this test is not currently running.
"""
ifhdr = 'If: (<locktoken:foo>) (Not <DAV:no-lock>)'
request = DummyRequest({'URL':'http://example.com/foo/PUT'},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment