statesofpop/django-cal — Issue #9: iCal feed doesn't work with Google Calendar
Author: swiharta
Created: 2011-11-19 23:17:22+00:00
State: open

Google Calendar loads the events.ics file created using this plugin if I save it and import the file. However, when I try using the "Add by URL" feature in Google Calendar, it won't load the calendar generated using this plugin.

I initially got an error message `The address that you provided did not contain a calendar in a valid iCal or GData format`. Noting other examples, I changed the `Content-Disposition` header from 'attachment' to 'inline', and now rather than give an error message, it just keeps displaying the "Importing calendar from url..." message, and the calendar does at least show up in my "Other Calendars" area, but none of the events get passed in correctly.

Running my file through a couple iCal validators, again the events.ics file saved and uploaded validates perfectly. But when I try to give it the URL of the iCal feed, [this validator](http://severinghaus.org/projects/icv/?url=) gives me this error:

Your calendar is using an invalid newline format. Make sure to use \r\n to end lines rather than just \n

Sorry, your calendar could not be parsed.
Error:	Error was: Error at line 1: Expected [-3], read [10]
Cause:
Context for line 1:
1:
2:
3:
4:
5:
6:

...and [this validator]() gives this error:

expecting "BEGIN", found '

Viewing my events.ics file in a text editor, there is no ' character before BEGIN, and each line ends with CRLF. I've tried changing my urls.py to include the filename `events.ics`, trying with `Content-Deposition` header set to `attachment` or `inline` with no luck.

I wonder what your results have been? Any help is much appreciated.