Code Repositories xandikos / 1391fcc
Fix allprop/propname handling. Jelmer Vernooń≥ 2 years ago
1 changed file(s) with 9 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
951951 # Default depth is infinity, per RFC2518
952952 depth = environ.get("HTTP_DEPTH", "infinity")
953953 if 'CONTENT_TYPE' not in environ and environ.get('CONTENT_LENGTH') == '0':
954 et = ET.Element('{DAV:}propfind')
955 ET.SubElement(et, '{DAV:}allprop')
954 requested = ET.Element('{DAV:}allprop')
956955 else:
957956 et = self._readXmlBody(environ)
958957 if et.tag != '{DAV:}propfind':
981980 for href, resource in traverse_resource(
982981 base_resource, self._request_href(environ), depth):
983982 propstat = []
984 for prop in self.properties:
985 propstat.append(get_property(resource, self.properties, prop.name))
983 for name in self.properties:
984 ps = get_property(resource, self.properties, name)
985 if ps.statuscode == '200 OK':
986 propstat.append(ps)
986987 ret.append(Status(href, '200 OK', propstat=propstat))
987988 return ret
988989 elif requested.tag == '{DAV:}propname':
990991 for href, resource in traverse_resource(
991992 base_resource, self._request_href(environ), depth):
992993 propstat = []
993 for prop in self.properties:
994 propstat.append(ET.Element(prop.name))
994 for name in self.properties:
995 ps = get_property(resource, self.properties, name)
996 if ps.statuscode == '200 OK':
997 propstat.append(ET.Element(name))
995998 ret.append(Status(href, '200 OK', propstat=propstat))
996999 return ret
9971000 else: