[Zope-Checkins] CVS: Zope/lib/python/webdav - webdav_magic.py:1.1.2.4

Andreas Jung andreas@zope.com
Tue, 6 Nov 2001 11:04:24 -0500


Update of /cvs-repository/Zope/lib/python/webdav
In directory cvs.zope.org:/tmp/cvs-serv19863/lib/python/webdav

Modified Files:
      Tag: ajung-webdav-debug
	webdav_magic.py 
Log Message:
added support for WebDAV clients trying to GET a document on the 
standard HTTP port. 



=== Zope/lib/python/webdav/webdav_magic.py 1.1.2.3 => 1.1.2.4 ===
 
 
-__version__='$Revision$'[11:-2]
-
+__version__='$Id$'
 
 import OFS.Image
 import re, cStringIO
 
 suffix_reg = re.compile('(\.[a-zA-Z]*$)')
-webdav_agents = re.compile('(GoLive)|(Dreamweaver)')
+webdav_agents = re.compile('(GoLive)|'
+                            '(Dreamweaver)|'
+                            '(WebDrive)|'
+                            '(cadaver)|'
+                            '(Microsoft Data Access.*DAV)'
+                        ).search
 
 
 def cloneFile(ob,destId,mime_type):
@@ -107,7 +111,7 @@
 def webdavCloneObject(ob, destId, REQUEST):
 
     agent = REQUEST.get("HTTP_USER_AGENT")
-    if not webdav_agents.search(agent):
+    if not webdav_agents(agent):
         raise TypeError,'unrecognized user agent'
 
     # determine object suffix