Commit f5668f66 authored by Chris Withers's avatar Chris Withers

Collector #1441: Removed headers introduced to make Microsoft webfolders and...

Collector #1441: Removed headers introduced to make Microsoft webfolders and office apps happy, since they make a lot of standards-compliant things unhappy AND they trick MS 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.
parent a9c89a0b
......@@ -139,6 +139,13 @@ Zope Changes
Bugs fixed
- Collector #1441: Removed headers introduced to make Microsoft
webfolders and office apps happy, since they make a lot of
standards-compliant things unhappy AND they trick MS 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.
- Collector #1445: Fixed bad interaction between -p and -v(v)
options to test.py that resulted in exceptions being printed
when they shouldn't have been.
......
......@@ -92,9 +92,6 @@ class ZServerHTTPResponse(HTTPResponse):
if headers.has_key('status'):
del headers['status']
if not headers.has_key("Etag"):
self.setHeader('Etag','')
# add zserver headers
append('Server: %s' % self._server_version)
append('Date: %s' % build_http_date(time.time()))
......
......@@ -43,7 +43,6 @@ class Collection(Resource):
response.setHeader('Content-Location', location)
response.setHeader('Connection', 'close', 1)
response.setHeader('Date', rfc1123_date(), 1)
response.setHeader('MS-Author-Via', 'DAV')
def HEAD(self, REQUEST, RESPONSE):
"""Retrieve resource information without a response body."""
......
......@@ -65,14 +65,12 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem):
# Init expected HTTP 1.1 / WebDAV headers which are not
# currently set by the base response object automagically.
#
# Note we set an borg-specific header for ie5 :( Also, we
# sniff for a ZServer response object, because we don't
# We sniff for a ZServer response object, because we don't
# want to write duplicate headers (since ZS writes Date
# and Connection itself).
if not hasattr(response, '_server_version'):
response.setHeader('Connection', 'close')
response.setHeader('Date', rfc1123_date(), 1)
response.setHeader('MS-Author-Via', 'DAV')
# HTTP Range support
if HTTPRangeInterface.isImplementedBy(self):
......@@ -199,7 +197,6 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem):
self.dav__init(REQUEST, RESPONSE)
RESPONSE.setHeader('Allow', ', '.join(self.__http_methods__))
RESPONSE.setHeader('Content-Length', 0)
RESPONSE.setHeader('DAV', '1,2', 1)
RESPONSE.setStatus(200)
return RESPONSE
......
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