Skip to content

Missing Content-Type header on PROPFIND requests causes 415 on Fastmail/Cyrus #4

@cradnovich

Description

@cradnovich

Description

CalendarHomeSet and ListCalendars coroutines send PROPFIND requests without the Content-Type: text/xml header. Servers that strictly validate this (like Fastmail's Cyrus) return 415 Unsupported Media Type.

Affected files

  • src/caldav/coroutines/calendar-home-set.rs — line 24: Request::propfind(config, "/") missing .content_type_xml()
  • src/caldav/coroutines/list-calendars.rs — line 21: Request::propfind(config, "").depth(1) missing .content_type_xml()

Note that current-user-principal.rs already correctly includes .content_type_xml().

Steps to reproduce

  1. Configure Calendula with Fastmail CalDAV (caldav.home-uri = "https://caldav.fastmail.com/dav/calendars/user/...")
  2. Run calendula calendars list
  3. Error: 415 Unsupported Media Type: This method requires an XML body

Fix

Add .content_type_xml() to the PROPFIND request builders in both files. PR incoming.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions