Просмотр исходного кода

Add support for supported-report-set PROPFIND tag

Guillaume Ayoub 15 лет назад
Родитель
Сommit
9b153d56cc
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      radicale/xmlutils.py

+ 6 - 0
radicale/xmlutils.py

@@ -121,6 +121,12 @@ def propfind(path, xml_request, calendar, request):
             element.text = calendar.etag
             element.text = calendar.etag
         elif tag == _tag("D", "displayname"):
         elif tag == _tag("D", "displayname"):
             element.text = calendar.name
             element.text = calendar.name
+        elif tag == _tag("D", "supported-report-set"):
+            supported_report = ET.Element(_tag("D", "supported-report"))
+            report = ET.Element(_tag("D", "report"))
+            report.append(ET.Element(_tag("C", "calendar-multiget")))
+            supported_report.append(report)
+            element.append(supported_report)
         elif tag == _tag("D", "principal-URL"):
         elif tag == _tag("D", "principal-URL"):
             # TODO: use a real principal URL, read rfc3744-4.2 for info
             # TODO: use a real principal URL, read rfc3744-4.2 for info
             element.text = "%s://%s%s" % (
             element.text = "%s://%s%s" % (