[Zope-Checkins] CVS: Zope2 - Collection.py:1.21 NullResource.py:1.30 Resource.py:1.46 davcmds.py:1.14

andreas@serenade.digicool.com andreas@serenade.digicool.com
Tue, 3 Jul 2001 14:19:16 -0400


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

Modified Files:
	Collection.py NullResource.py Resource.py davcmds.py 
Log Message:
several fixes to support Office 2K



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

--- Updated File NullResource.py in package Zope2 --
--- NullResource.py	2001/06/07 22:18:46	1.29
+++ NullResource.py	2001/07/03 18:19:16	1.30
@@ -232,7 +232,7 @@
         creator = security.getUser()
         body = REQUEST.get('BODY', '')
         ifhdr = REQUEST.get_header('If', '')
-        depth = REQUEST.get_header('Depth', 'infinite')
+        depth = REQUEST.get_header('Depth', 'infinity')
 
         name = self.__name__
         parent = self.__parent__

--- Updated File Resource.py in package Zope2 --
--- Resource.py	2001/05/23 19:09:32	1.45
+++ Resource.py	2001/07/03 18:19:16	1.46
@@ -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
@@ -538,7 +542,7 @@
         creator = security.getUser()
         body = REQUEST.get('BODY', '')
         ifhdr = REQUEST.get_header('If', None)
-        depth = REQUEST.get_header('Depth', 'infinite')
+        depth = REQUEST.get_header('Depth', 'infinity')
         alreadylocked = Lockable.wl_isLocked(self)
 
         if body and alreadylocked:

--- Updated File davcmds.py in package Zope2 --
--- davcmds.py	2001/04/27 18:07:19	1.13
+++ davcmds.py	2001/07/03 18:19:16	1.14
@@ -226,6 +226,7 @@
                     if dflag: ob._p_deactivate()
         if not top: return result
         result.write('</d:multistatus>')
+        
         return result.getvalue()
 
 
@@ -352,7 +353,7 @@
         self.scope = 'exclusive'
         self.type = 'write'
         self.owner = ''
-        timeout = request.get_header('Timeout', 'Infinite')
+        timeout = request.get_header('Timeout', 'infinite')
         self.timeout = string.strip(string.split(timeout,',')[-1])
         self.parse(data)
 
@@ -388,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')
@@ -401,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:
@@ -475,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