Commit c2dba5e7 authored by Hanno Schlichting's avatar Hanno Schlichting

Removed the `enable-ms-author-via` directive which was only required for very...

Removed the `enable-ms-author-via` directive which was only required for very old web folder implementations from before 2007.
parent 38968dcf
......@@ -31,6 +31,9 @@ Features Added
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`.
......
......@@ -106,10 +106,6 @@ def cgi_maxlen(value):
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
......
......@@ -104,28 +104,6 @@ class StartupTestCase(unittest.TestCase):
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
......
......@@ -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
......
......@@ -206,38 +206,6 @@ instancehome $INSTANCE
# 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:
......
......@@ -238,8 +238,6 @@ class Resource(Base, LockableItem):
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
......
......@@ -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
......@@ -105,32 +105,6 @@ class TestResource(unittest.TestCase):
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
......
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