Commit cc8787b0 authored by 's avatar

Fixed DAV header to only be generated on OPTIONS requests.

parent 90f0ea0b
......@@ -85,7 +85,7 @@
"""WebDAV support - collection objects."""
__version__='$Revision: 1.9 $'[11:-2]
__version__='$Revision: 1.10 $'[11:-2]
import sys, os, string
from Resource import Resource
......@@ -109,7 +109,6 @@ class Collection(Resource):
raise 'Moved Permanently', request['URL1']+'/'
response.setHeader('Connection', 'close', 1)
response.setHeader('Date', rfc1123_date(), 1)
response.setHeader('DAV', '1', 1)
def PUT(self, REQUEST, RESPONSE):
"""The PUT method has no inherent meaning for collection
......
......@@ -85,7 +85,7 @@
"""WebDAV support - resource objects."""
__version__='$Revision: 1.18 $'[11:-2]
__version__='$Revision: 1.19 $'[11:-2]
import sys, os, string, mimetypes, davcmds
from common import absattr, aq_base, urlfix, rfc1123_date
......@@ -110,7 +110,6 @@ class Resource:
# currently set by the response object automagically.
response.setHeader('Connection', 'close', 1)
response.setHeader('Date', rfc1123_date(), 1)
response.setHeader('DAV', '1', 1)
def dav__validate(self, object, methodname, REQUEST):
msg='<strong>You are not authorized to access this resource.</strong>'
......@@ -157,6 +156,7 @@ class Resource:
self.dav__init(REQUEST, RESPONSE)
RESPONSE.setHeader('Allow', string.join(self.__http_methods__,', '))
RESPONSE.setHeader('Content-Length', 0)
RESPONSE.setHeader('DAV', '1', 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