Skip to content

Conversation

@LuceusXylian
Copy link
Collaborator

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.

Copy link
Contributor

Copilot AI left a 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 /calendar to /calendars/my-calendar to use the standard CalDAV directory structure
  • Added automatic creation of the /calendars directory 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.

Comment on lines 360 to 362

// Not found
missing_hrefs.push(item_path.to_string());
Copy link

Copilot AI Jan 14, 2026

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.

Suggested change
// Not found
missing_hrefs.push(item_path.to_string());

Copilot uses AI. Check for mistakes.
LuceusXylian and others added 5 commits January 14, 2026 21:40
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>
@messense messense merged commit 4a0d59a into messense:main Jan 15, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants