-
Notifications
You must be signed in to change notification settings - Fork 42
Add CardDAV (RFC 6352) support #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements CardDAV (RFC 6352) support for the dav-server library, following the same patterns as the existing CalDAV implementation. It adds vCard-based contact management capabilities alongside the existing calendar functionality.
Changes:
- Adds carddav feature flag with calcard dependency for vCard parsing and validation
- Implements MKADDRESSBOOK method and addressbook-query/addressbook-multiget REPORT types
- Adds CardDAV-specific properties (addressbook-home-set, supported-address-data) and metadata trait methods
- Refactors shared filter types (TextMatch, ParameterFilter) into dav_filters module for code reuse between CalDAV and CardDAV
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Adds carddav feature flag and calcard dependency |
| src/lib.rs | Exposes new carddav and dav_filters modules |
| src/dav_filters.rs | New shared module for TextMatch and ParameterFilter types used by both CalDAV and CardDAV |
| src/carddav.rs | Core CardDAV module with types, XML helpers, and vCard validation functions |
| src/handle_carddav.rs | Implements MKADDRESSBOOK method and REPORT handlers for addressbook queries |
| src/handle_caldav.rs | Updates CalDAV REPORT handler to route CardDAV requests and adds match_type field to TextMatch |
| src/caldav.rs | Removes duplicate TextMatch/ParameterFilter types, re-exports from dav_filters |
| src/handle_props.rs | Adds CardDAV property support in PROPFIND responses |
| src/handle_options.rs | Adds CardDAV compliance string and methods to OPTIONS responses |
| src/davhandler.rs | Routes MKADDRESSBOOK and REPORT methods based on feature flags |
| src/util.rs | Adds MkAddressbook to DavMethod enum |
| src/fs.rs | Adds is_addressbook trait method to DavMetaData |
| src/memfs.rs | Implements is_addressbook for MemFs and creates default addressbooks directory |
| src/localfs.rs | Implements is_addressbook for LocalFs and creates default addressbooks directory |
| src/localfs_macos.rs | Implements is_addressbook for EmptyMetaData (returns false) |
| tests/carddav_tests.rs | Comprehensive test suite for CardDAV functionality |
| tests/caldav_tests.rs | Updates REPORT test to handle conditional feature flags |
| examples/carddav.rs | Example CardDAV server using Axum |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Implement CardDAV functionality following the same patterns as CalDAV: - Add carddav feature flag with calcard dependency for vCard parsing - Implement MKADDRESSBOOK method for creating address book collections - Add REPORT support for addressbook-query and addressbook-multiget - Add addressbook-home-set property for client discovery - Add supported-address-data property (vCard 3.0 and 4.0) - Implement is_addressbook() trait method for DavMetaData - Add CardDAV example server with Axum
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Implement CardDAV functionality following the same patterns as CalDAV:
Totally vibe-coded.