Support displayname and principal-URL tags in PROPFIND requests

This commit is contained in:
Guillaume Ayoub
2010-09-12 13:13:21 +02:00
parent 873dec1d5d
commit 71819cdb39
3 changed files with 26 additions and 18 deletions

View File

@@ -76,6 +76,8 @@ def _check(request, function):
class HTTPServer(server.HTTPServer):
"""HTTP server."""
PROTOCOL = "http"
# Maybe a Pylint bug, ``__init__`` calls ``server.HTTPServer.__init__``
# pylint: disable=W0231
def __init__(self, address, handler):
@@ -87,6 +89,7 @@ class HTTPServer(server.HTTPServer):
class HTTPSServer(HTTPServer):
"""HTTPS server."""
PROTOCOL = "https"
def __init__(self, address, handler):
"""Create server by wrapping HTTP socket in an SSL socket."""
# Fails with Python 2.5, import if needed
@@ -208,7 +211,7 @@ class CalendarHTTPHandler(server.BaseHTTPRequestHandler):
def do_PROPFIND(self):
"""Manage PROPFIND request."""
xml_request = self.rfile.read(int(self.headers["Content-Length"]))
self._answer = xmlutils.propfind(self.path, xml_request, self._calendar)
self._answer = xmlutils.propfind(self.path, xml_request, self._calendar, self)
self.send_response(client.MULTI_STATUS)
self.send_header("DAV", "1, calendar-access")