Log message for revision 122062: Removed the `enable-ms-author-via` directive which was only required for very old web folder implementations from before 2007.
Changed: U Zope/trunk/doc/CHANGES.rst U Zope/trunk/src/Zope2/Startup/handlers.py U Zope/trunk/src/Zope2/Startup/tests/test_schema.py U Zope/trunk/src/Zope2/Startup/zopeschema.xml U Zope/trunk/src/Zope2/utilities/skel/etc/zope.conf.in U Zope/trunk/src/webdav/Resource.py U Zope/trunk/src/webdav/__init__.py U Zope/trunk/src/webdav/tests/testResource.py -=- Modified: Zope/trunk/doc/CHANGES.rst =================================================================== --- Zope/trunk/doc/CHANGES.rst 2011-07-02 16:20:12 UTC (rev 122061) +++ Zope/trunk/doc/CHANGES.rst 2011-07-02 16:22:43 UTC (rev 122062) @@ -31,6 +31,9 @@ Restructuring +++++++++++++ +- Removed the `enable-ms-author-via` directive which was only required for + very old web folder implementations from before 2007. + - Changed zope.conf default settings for `zserver-threads` to `2` and `python-check-interval` to `1000`. Modified: Zope/trunk/src/Zope2/Startup/handlers.py =================================================================== --- Zope/trunk/src/Zope2/Startup/handlers.py 2011-07-02 16:20:12 UTC (rev 122061) +++ Zope/trunk/src/Zope2/Startup/handlers.py 2011-07-02 16:22:43 UTC (rev 122062) @@ -106,10 +106,6 @@ def http_header_max_length(value): return value -def enable_ms_author_via(value): - import webdav - webdav.enable_ms_author_via = value - def enable_ms_public_header(value): import webdav webdav.enable_ms_public_header = value Modified: Zope/trunk/src/Zope2/Startup/tests/test_schema.py =================================================================== --- Zope/trunk/src/Zope2/Startup/tests/test_schema.py 2011-07-02 16:20:12 UTC (rev 122061) +++ Zope/trunk/src/Zope2/Startup/tests/test_schema.py 2011-07-02 16:22:43 UTC (rev 122062) @@ -104,28 +104,6 @@ items.sort() self.assertEqual(items, [("FEARFACTORY", "rocks"), ("NSYNC","doesnt")]) - def test_ms_author_via(self): - import webdav - from Zope2.Startup.handlers import handleConfig - - default_setting = webdav.enable_ms_author_via - try: - conf, handler = self.load_config_text("""\ - instancehome <<INSTANCE_HOME>> - enable-ms-author-via true - """) - handleConfig(None, handler) - self.assert_(webdav.enable_ms_author_via == True) - - conf, handler = self.load_config_text("""\ - instancehome <<INSTANCE_HOME>> - enable-ms-author-via false - """) - handleConfig(None, handler) - self.assert_(webdav.enable_ms_author_via == False) - finally: - webdav.enable_ms_author_via = default_setting - def test_ms_public_header(self): import webdav from Zope2.Startup.handlers import handleConfig Modified: Zope/trunk/src/Zope2/Startup/zopeschema.xml =================================================================== --- Zope/trunk/src/Zope2/Startup/zopeschema.xml 2011-07-02 16:20:12 UTC (rev 122061) +++ Zope/trunk/src/Zope2/Startup/zopeschema.xml 2011-07-02 16:22:43 UTC (rev 122062) @@ -555,34 +555,6 @@ </description> </key> - <key name="enable-ms-author-via" datatype="boolean" handler="enable_ms_author_via" default="off"> - <description> - Set this directive to 'true' to enable the "MS-Author-Via" header - in response to an OPTIONS WebDAV request. Early versions of - Microsoft Web Folders and Microsoft Office require this header to - be present to be able to connect to Zope via WebDAV. - - This is disabled by default since it makes a lot of standards-compliant - things unhappy AND it tricks Microsoft Office into trying to edit Office - files stored in Zope via WebDAV even when the user isn't allowed to edit - them and is only trying to download them. - - Check this collector entry for more information: - http://www.zope.org/Collectors/Zope/1441 - - Recent versions of Microsoft Web Folders, updated after January - 2005, do not require this header anymore, and instead require a - "Public" header to be present in reply to the OPTIONS WebDAV - request. - (http://www.redmountainsw.com/wordpress/archives/webfolders-zope) - - To get a recent Microsoft Web Folders implementation, refer to - Microsoft KB Article 907306. - (Software Update for Web Folders: May 18, 2007). - </description> - <metadefault>off</metadefault> - </key> - <key name="enable-ms-public-header" datatype="boolean" handler="enable_ms_public_header" default="off"> <description> Set this directive to 'on' to enable sending the "Public" header Modified: Zope/trunk/src/Zope2/utilities/skel/etc/zope.conf.in =================================================================== --- Zope/trunk/src/Zope2/utilities/skel/etc/zope.conf.in 2011-07-02 16:20:12 UTC (rev 122061) +++ Zope/trunk/src/Zope2/utilities/skel/etc/zope.conf.in 2011-07-02 16:22:43 UTC (rev 122062) @@ -206,38 +206,6 @@ # http-realm Slipknot -# Directive: enable-ms-author-via -# -# Description: -# Set this directive to 'true' to enable the "MS-Author-Via" header -# in response to an OPTIONS WebDAV request. Early versions of -# Microsoft Web Folders and Microsoft Office require this header to -# be present to be able to connect to Zope via WebDAV. -# -# This is disabled by default since it makes a lot of standards-compliant -# things unhappy AND it tricks Microsoft Office into trying to edit Office -# files stored in Zope via WebDAV even when the user isn't allowed to edit -# them and is only trying to download them. -# -# Check this collector entry for more information: -# http://www.zope.org/Collectors/Zope/1441 -# -# Recent versions of Microsoft Web Folders, updated after January -# 2005, do not require this header anymore, and instead require a -# "Public" header to be present in reply to the OPTIONS WebDAV -# request. -# (http://www.redmountainsw.com/wordpress/archives/webfolders-zope) -# -# To get a recent Microsoft Web Folders implementation, refer to -# Microsoft KB Article 907306. -# (Software Update for Web Folders: May 18, 2007). -# -# Default: off -# -# Example: -# -# enable-ms-author-via on - # Directive: enable-ms-public-header # # Description: Modified: Zope/trunk/src/webdav/Resource.py =================================================================== --- Zope/trunk/src/webdav/Resource.py 2011-07-02 16:20:12 UTC (rev 122061) +++ Zope/trunk/src/webdav/Resource.py 2011-07-02 16:22:43 UTC (rev 122062) @@ -238,8 +238,6 @@ if ms_dav_agent.match(REQUEST.get_header('User-Agent', '')): if webdav.enable_ms_public_header: RESPONSE.setHeader('Public', ', '.join(self.__http_methods__)) - if webdav.enable_ms_author_via: - RESPONSE.setHeader('MS-Author-Via', 'DAV') RESPONSE.setStatus(200) return RESPONSE Modified: Zope/trunk/src/webdav/__init__.py =================================================================== --- Zope/trunk/src/webdav/__init__.py 2011-07-02 16:20:12 UTC (rev 122061) +++ Zope/trunk/src/webdav/__init__.py 2011-07-02 16:22:43 UTC (rev 122062) @@ -35,5 +35,4 @@ Jensen, "HTTP Extensions for Distributed Authoring - WebDAV." RFC 2518. Microsoft, U.C. Irvine, Netscape, Novell. February, 1999.""" -enable_ms_author_via = False enable_ms_public_header = False Modified: Zope/trunk/src/webdav/tests/testResource.py =================================================================== --- Zope/trunk/src/webdav/tests/testResource.py 2011-07-02 16:20:12 UTC (rev 122061) +++ Zope/trunk/src/webdav/tests/testResource.py 2011-07-02 16:22:43 UTC (rev 122062) @@ -105,32 +105,6 @@ verifyClass(IDAVResource, self._getTargetClass()) verifyClass(IWriteLock, self._getTargetClass()) - def test_ms_author_via(self): - import webdav - - default_settings = webdav.enable_ms_author_via - try: - req, resp = make_request_response() - resource = self._makeOne() - resource.OPTIONS(req, resp) - self.assert_(not resp.headers.has_key('ms-author-via')) - - webdav.enable_ms_author_via = True - req, resp = make_request_response() - resource = self._makeOne() - resource.OPTIONS(req, resp) - self.assert_(not resp.headers.has_key('ms-author-via')) - - req, resp = make_request_response( - environ={'USER_AGENT': MS_DAV_AGENT}) - resource = self._makeOne() - resource.OPTIONS(req, resp) - self.assert_(resp.headers.has_key('ms-author-via')) - self.assert_(resp.headers['ms-author-via'] == 'DAV') - - finally: - webdav.enable_ms_author_via = default_settings - def test_ms_public_header(self): import webdav _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins