fix: use correct Content-Type for vCard PUT requests#83
Merged
SebastianKrupinski merged 1 commit intoJun 25, 2026
Merged
Conversation
SebastianKrupinski
approved these changes
Jun 25, 2026
SebastianKrupinski
left a comment
Collaborator
There was a problem hiding this comment.
I fixed this in calendar but it seems I missed it in contacts
RFC 6350 defines the media type for vCard data as text/vcard, not application/vcard. Sending application/vcard causes CardDAV servers that strictly validate the Content-Type (e.g. Fastmail/Cyrus) to reject PUT requests with 403 Forbidden / <C:supported-address-data>, leaving contacts unsynced to the remote server. Change entityCreate() and entityModify() in RemoteContactsService to use text/vcard; charset=utf-8, consistent with how RemoteEventsService already uses text/calendar; charset=utf-8 for iCalendar data. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4ead568 to
b723145
Compare
Collaborator
|
DCO was still failing but I merged anyways, just make use you sign the commits properly |
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
text/vcard, notapplication/vcard.application/vcardis not a valid MIME type and causes CardDAV servers that strictly validate the Content-Type (e.g. Fastmail/Cyrus IMAP) to reject PUT requests with403 Forbiddenand a<C:supported-address-data>precondition error.RemoteEventsServicealready correctly usestext/calendar; charset=utf-8for iCalendar — this fix bringsRemoteContactsServicein line for vCard.Test plan