Add content type for collection items

This commit is contained in:
Guillaume Ayoub 2013-05-14 13:18:12 +02:00
parent b7aa5c8d14
commit dd7f886fcc

View File

@ -513,6 +513,9 @@ def report(path, xml_request, collection):
element = ET.Element(tag)
if tag == _tag("D", "getetag"):
element.text = item.etag
elif tag == _tag("D", "getcontenttype"):
element.text = "%s; component=%s" % (
item.mimetype, item.tag.lower())
elif tag in (_tag("C", "calendar-data"),
_tag("CR", "address-data")):
if isinstance(item, ical.Component):