PropTest.ktProp.extractProps() — the XML parser that extracts requested DAV property names from PROPFIND and sync-collection request bodies. Validates that property elements within <prop> or <d:prop> blocks are correctly identified, sorted alphabetically, and mapped to their PropType enum values.The Prop class represents a single DAV property requested by a client. The static extractProps(xml: String): List<Prop> method parses WebDAV XML request bodies to determine what properties the client wants to retrieve.
| PropType | XML Element | DAV/CardDAV Purpose |
|---|---|---|
CURRENT_USER_PRINCIPAL | <current-user-principal /> | URL of the authenticated user's principal resource (RFC 5397) |
CURRENT_USER_PRIVILEGE_SET | <current-user-privilege-set /> | Privileges granted to the current user (RFC 3744) |
DISPLAYNAME | <displayname /> | Human-readable name of the resource (RFC 4918) |
RESOURCETYPE | <resourcetype /> | Whether the resource is a collection (RFC 4918) |
GETCTAG | <cs:getctag /> | Calendar Server collection tag for change detection (Apple extension) |
GETETAG | <d:getetag /> | HTTP entity tag for the resource (RFC 4918) |
SYNCTOKEN | <sync-token /> | Token for incremental collection synchronization (RFC 6578) |
Input is a PROPFIND request body using a default XML namespace (xmlns="DAV:") — elements are unprefixed. The test verifies:
PropType is correctly identifiedInput simulates a sync-collection REPORT request (part of the RFC 6578 WebDAV Sync extension). The XML uses namespace prefixes (d:, cs:). The test verifies:
The extractProps method must:
<prop> or <d:prop> element block within the XMLPropType enum valuesPropTypeList<Prop><prop> element is named <d:prop> inside an outer <propfind> wrapper), but the test correctly handles it — demonstrating the parser's robustness across different DAV request types.868d6abb7 2025 -> 2026 63081666f Source file headers: 2024-> 2025. 5167dab99 WIP: Carddav 78a5132bf WIP: Carddav caee35750 WIP: Carddav 2ad0cfe66 WIP: Carddav