Skip to content

Fix MKCOL calendar creation by removing protected properties - #178

Merged
patrickunterwegs merged 1 commit into
mainfrom
claude/clever-knuth-2wzzi7
Oct 14, 2026
Merged

patrickunterwegs merged 1 commit into
mainfrom
claude/clever-knuth-2wzzi7

Conversation

@patrickunterwegs

Copy link
Copy Markdown
Member

Summary

Fixes calendar creation failures by removing the current-user-principal property from the MKCOL request. Per RFC 5689, protected properties must not be included in WebDAV property-setting operations, as the entire request fails if any property is rejected.

Changes

  • Removed protected property: Deleted currentUserPrincipal = CurrentUserPrincipal() from the MKCOL request body, which was causing server rejections
  • Improved error diagnostics: Extract and log the full response body (mkcol-response XML) when MKCOL fails, providing server-specific rejection details
  • Enhanced error messages: Pass response body details to all failure cases (Forbidden, Conflict, MethodNotAllowed, etc.) so users see why the operation failed
  • Added clarifying comment: Document the RFC 5689 constraint for future maintainers

Implementation Details

The response body from a failed MKCOL contains an mkcol-response element that names which properties or preconditions the server rejected. This is now captured and logged at warning level, then included in the error result passed to the UI, giving better visibility into CalDAV server behavior.

https://claude.ai/code/session_0182qE7PHNqy9YKpN4ufmMu3

…alendar

Strict servers such as Fastmail (Cyrus) reject the whole MKCOL with 403 when
the body tries to set a protected property, which surfaced as a misleading
'missing privileges' error. Also keep the server's response body in the error
details so the rejected property/precondition is visible.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0182qE7PHNqy9YKpN4ufmMu3
@patrickunterwegs
patrickunterwegs merged commit 590926d into main Oct 14, 2026
1 check 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