Repository navigation
C1: calcraft-client CalDAV/CardDAV protocol library - #1
Merged
Merged
Conversation
calcraft-client implements service discovery (RFC 6764 well-known, current-user-principal, home sets), collection listing and management (MKCALENDAR, extended MKCOL, PROPPATCH), sync-collection (RFC 6578) with 507 continuation and invalid-token resync plus a ctag/etag fallback, batched calendar-/addressbook-multiget and conditional PUT/DELETE with a typed 412 conflict error. Security: one origin per client (foreign URLs refused before sending, foreign hrefs dropped, cross-origin redirects not followed), HTTPS required except for loopback, zeroized and redacted credentials, hardened quick-xml parsing (size/depth/element limits, no DTDs or custom entities, namespace-resolved), strict URL/href canonicalisation. All I/O goes through the HttpTransport trait; the default hyper-transport feature provides hyper + rustls (ring, webpki-roots, optional extra CAs). Tests replay CalCraft, sabre/Nextcloud and Radicale style responses and hostile inputs through a mock transport; a live test runs against a real server when CALCRAFT_TEST_URL is set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jan Runkel <jan.runkel@zeitgleich.de>
- multistatus: consume the element tree instead of cloning propstats per href, and enforce RFC 4918 (several hrefs only with a status and no propstat); a 5,000-href/5,000-prop response is now rejected cheaply - sync: cap accumulated entries across truncated pages (ClientOptions::max_sync_entries, default 200,000) - sync: fall back to ctag permanently only on clear signals (501 or a DAV:supported-report precondition); other 4xx fall back for this run and keep the sync token - discovery: drop foreign or malformed hrefs in properties; error only when no usable href remains - objects: refuse weak entity tags for If-Match with Error::WeakEtag instead of sending a precondition that can never match - CI: build with --locked Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jan Runkel <jan.runkel@zeitgleich.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Milestone C1 of CalCraftApp: a standards-based CalDAV/CardDAV client library that works with CalCraft and other servers.
sync-collectionincl. 507 truncation and invalid-token resync; ctag + Depth 1 fallback (permanent only on 501 /supported-report)If-None-Match: */If-Match, delete; typed errors for 412 and weak etagsHttpTransporttrait; default hyper + rustls (ring, webpki roots + optional extra CAs), HTTPS required except loopbackImplemented by an Opus agent; Haiku review found a memory-amplification blocker and five more issues, all fixed with regression tests.
Test plan
🤖 Generated with Claude Code