Adding a web calendar without a `.ics` file extension in the URL doesn't work
short : meetup.com calendars url https://www.meetup.com/fr-FR/events/ical/<number>/<hexa>/going
can't be added
ugly workaround : add
https://www.meetup.com/fr-FR/events/ical/<number>/<hexa>/going#.ics
long : Currently, when we add a web calendar, uri_get_fields()
first tries to detect if the url links to a file. See src/gcal-utils.c#n959
For this, it checks if the url ends with en extension. But some files don't end with en extension.
Then, e_webdav_discover_sources is used()
, but fails, as an ICS file is not xml:
16:07:08.0702 GcalSourceDialog: DEBUG: Detected host: 'www.meetup.com', path: '/fr-FR/events/ical/…/…/going'
16:07:08.0704 GcalSourceDialog: DEBUG: Trying to connect without credentials...
response.xml:1: parser error : Start tag expected, '<' not found
BEGIN:VCALENDAR
^
16:07:09.0572 GcalSourceDialog: DEBUG: [source-dialog] error: Could not parse response
Maybe we should also try to get the headers and check the Content-Type ?