GNOME Bugzilla – Bug 514487
CalDAV backend doesn't accept mime types "text/calendar" with charset information
Last modified: 2013-09-14 16:50:14 UTC
Please describe the problem: I use DAViCal aka rscds for handling CalDAV calendars. However, newest versions now provide ics with MIME type "text/calendar; charset=utf-8", which by itself is valid MIME. However e-d-s function can't use it in current state and therefore file is silently dropped, resulting in enabled, but empty calendar for user. Code in question resists in calendar/backends/caldav, file e-cal-backend-caldav.c, line #1022. Code is: if (hdr == NULL || g_ascii_strcasecmp (hdr, "text/calendar")) { ... ... } but it must be changed to: if (hdr == NULL || g_ascii_strncasecmp (hdr, "text/calendar", 13)) { ... ... } As it gets first 13 chars, which is "text/calendar" length. Steps to reproduce: 1. Open Evolution 2. Choose Calendars, New=> Calendar, CalDAV, enter details (server should be newest DAViCal, rscds.sourceforge.net), press OK. Connection is made. 3. Enter event to CalDAV calendar, which gets published 4. Delete calendar from sidebar and re-add it trough New => Calendar Actual results: Events don't show up, however Apache log shows that ics files gets downloaded. Expected results: Events entered before shows up as they downloaded from CalDAV server. Does this happen every time? Yes Other information: This is _very_ easy fix. Maybe discussion is needed is this proper way to handle such MIME messages.
Created attachment 104476 [details] [review] Diff for fix and ChangeLog entry Adding diff for fix and ChangeLog entry. Should be enough.
Looks fine to commit, I will only a little bit change the ChangeLog entry (there should be a notice about bug if we have any).
Committed to trunk. Committed revision 8457.
*** Bug 496742 has been marked as a duplicate of this bug. ***
*** Bug 451888 has been marked as a duplicate of this bug. ***