[Zope-Checkins] CVS: Zope2 - Collection.py:1.20.16.1 NullResource.py:1.29.4.2 Resource.py:1.45.4.2 davcmds.py:1.13.16.2

andreas@serenade.digicool.com andreas@serenade.digicool.com
Mon, 2 Jul 2001 13:42:04 -0400


Update of /cvs-repository/Zope2/lib/python/webdav
In directory serenade:/tmp/cvs-serv20381/lib/python/webdav

Modified Files:
      Tag: Zope-2_4-branch
	Collection.py NullResource.py Resource.py davcmds.py 
Log Message:
Fixes in WebDAV code to be compatible with M$ Office 2K



--- Updated File Collection.py in package Zope2 --

--- Updated File NullResource.py in package Zope2 --

--- Updated File Resource.py in package Zope2 --
--- Resource.py	2001/07/02 15:44:17	1.45.4.1
+++ Resource.py	2001/07/02 17:42:04	1.45.4.2
@@ -181,10 +181,12 @@
         found = 0; resourcetagged = 0
         taglist = IfParser(ifhdr)
         for tag in taglist:
+            
             if not tag.resource:
                 # There's no resource (url) with this tag
-                taglist = map(tokenFinder, tag.list)
-                wehave = filter(havetag, list)
+                tag_list = map(tokenFinder, tag.list)
+                wehave = filter(havetag, tag_list)
+
                 if not wehave: continue
                 if tag.NOTTED: continue
                 if refresh:
@@ -193,8 +195,9 @@
                 found = 1; break
             elif urlbase(tag.resource) == url:
                 resourcetagged = 1
-                taglist = map(tokenFinder, tag.list)
-                wehave = filter(havetag, taglist)
+                tag_list = map(tokenFinder, tag.list)
+                wehave = filter(havetag, tag_list)
+
                 if not wehave: continue
                 if tag.NOTTED: continue
                 if refresh:
@@ -300,6 +303,7 @@
         if parent.manage_delObjects([name],REQUEST=None)  is None:
             RESPONSE.setStatus(204)
         else:
+            
             RESPONSE.setStatus(403)
 
         return RESPONSE

--- Updated File davcmds.py in package Zope2 --
--- davcmds.py	2001/07/02 15:44:17	1.13.16.1
+++ davcmds.py	2001/07/02 17:42:04	1.13.16.2
@@ -353,7 +353,7 @@
         self.scope = 'exclusive'
         self.type = 'write'
         self.owner = ''
-        timeout = request.get_header('Timeout', 'Infinite')
+        timeout = request.get_header('Timeout', 'infinity')
         self.timeout = string.strip(string.split(timeout,',')[-1])
         self.parse(data)
 
@@ -389,6 +389,7 @@
               result=None, url=None, top=1):
         """ Apply, built for recursion (so that we may lock subitems
         of a collection if requested """
+
         if result is None:
             result = StringIO()
             url = urlfix(self.request['URL'], 'LOCK')
@@ -402,6 +403,7 @@
             lock = LockItem(creator, self.owner, depth, self.timeout,
                             self.type, self.scope, token)
             if token is None: token = lock.getLockToken()
+            
         except ValueError, valerrors:
             errmsg = "412 Precondition Failed"
         except:
@@ -476,7 +478,8 @@
             method = getattr(obj, 'wl_delLock')
             vld = getSecurityManager().validate(None,obj,'wl_delLock',method)
             if vld: obj.wl_delLock(token)
-            else: errmsg = "403 Forbidden"
+            else: 
+                errmsg = "403 Forbidden"
         elif not islockable:
             # Only set an error message if the command is being applied
             # to a top level object.  Otherwise, we're descending a tree