-
Notifications
You must be signed in to change notification settings - Fork 42
CalDAV improvements: Calendar directory autodiscover, prefix fix, REPORT method fix #56
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 pull request implements several CalDAV improvements to enhance calendar functionality in the dav-server library. The changes focus on automatic calendar directory creation, fixing URI path prefixes, and improving the REPORT method implementation for better CalDAV client compatibility.
Changes:
- Updated all test URIs from
/calendarto/calendars/my-calendarto use the standard CalDAV directory structure - Added automatic creation of the
/calendarsdirectory in MemFs and LocalFs implementations - Refactored REPORT method handling to use PropWriter for consistent XML response generation
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/caldav_tests.rs | Updated test URIs to use /calendars/ prefix and enhanced test assertions with better error messages |
| src/memfs.rs | Added automatic /calendars directory creation and is_calendar method implementation |
| src/localfs.rs | Added automatic /calendars directory creation and is_calendar method implementation |
| src/localfs_macos.rs | Added stub is_calendar method implementation |
| src/handle_props.rs | Added is_calendar checks and CalDAV namespace handling, made PropWriter public for reuse |
| src/handle_caldav.rs | Refactored response generation to use PropWriter and improved calendar multiget handling |
| src/fs.rs | Added is_calendar trait method to DavMetaData |
| src/caldav.rs | Added default CalDAV directory constants, fixed element naming with prefixes, and improved helper functions |
| examples/caldav.rs | Switched from MemFs to LocalFs and added request logging middleware |
| README.CalDAV.md | Updated documentation to reflect new directory structure and setup requirements |
| Cargo.toml | Updated hyper-util dependency from 0.1.2 to 0.1.19 and bumped version to 0.10.0 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/handle_caldav.rs
Outdated
|
|
||
| // Not found | ||
| missing_hrefs.push(item_path.to_string()); |
Copilot
AI
Jan 14, 2026
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.
In the calendar query handler, items that don't match the query filter are being added to the missing_hrefs list and will be reported with 404 Not Found status. This is incorrect behavior - calendar items that don't match the query filter should simply be excluded from the response, not reported as missing. The missing_hrefs should only be used for items that are requested but don't exist.
| // Not found | |
| missing_hrefs.push(item_path.to_string()); |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sorry for this mess in the git history. Because of a merge between commits I do not know how to squash safely the commits together.