Add support for MKCALENDAR requests

This commit is contained in:
Guillaume Ayoub 2011-02-01 17:01:30 +01:00
parent c38c79a738
commit 9b535ba4b2

View File

@ -204,11 +204,18 @@ class CalendarHTTPHandler(server.BaseHTTPRequestHandler):
# No item or ETag precondition not verified, do not delete item
self.send_response(client.PRECONDITION_FAILED)
@check_rights
def do_MKCALENDAR(self):
"""Manage MKCALENDAR request."""
self.send_response(client.CREATED)
self.end_headers()
def do_OPTIONS(self):
"""Manage OPTIONS request."""
self.send_response(client.OK)
self.send_header(
"Allow", "DELETE, HEAD, GET, OPTIONS, PROPFIND, PUT, REPORT")
"Allow", "DELETE, HEAD, GET, MKCALENDAR, "
"OPTIONS, PROPFIND, PUT, REPORT")
self.send_header("DAV", "1, calendar-access")
self.end_headers()