[Seaside] Re: iCal to Drupal requires Content-Encoding: gzip

Philippe Marschall philippe.marschall at gmail.com
Tue Sep 22 19:07:10 UTC 2009

2009/9/22, bobn at rogers.com <bobn at rogers.com>:
> Thanks for the replies.
>>It is unlikely that Drupal needs the content as gzip.
>>Have you compared the actual data? Does the format and encoding match?
> Yup.  From what we can see the Google and our iCal files are the same
> format.
> I even added things like timezone headers (copied from Google), which are
> optional in the iCal spec.
> http://www.ietf.org/rfc/rfc2445.txt
>>Do you use CR LR and not just LF or CR?
> Both contain CR after the file is saved.

Bad, bad, BAD. The spec says CRLF.

>>Are you sure content-length matches the lenght of your content?
> Yes.  Content-Length: 10944
> 'C:\Documents and Settings\bnemec\My Documents\events.ics' asFilename
> contentsOfEntireFile size = 10944
>>Have you tried returning the same thing as Google just without gzip (and a
>> correct content-lenght).
> That's the only way I'm able to make it work at all, as a non-zipped file.

Good. Then there's likely a problem with your iCal. Happy debugging.

> Answering a gzip file is just not working yet ... I'd like to understand how
> to do that, even though it's not the likely cause of this problem.

If you send gzip, then you need to indicate that using the
Content-Encoding header. How else would the user agent know it's gzip.

>> Have you tried dropping the content-disposition header?
> Working on that one... as suggested by Boris.
>>Aren't you sending it as an attachment and google simply serving it in the
>> contents?
>>I see the following header in your response, but not in Google's?
>>I agree with Philippe, it's very unlikely that gzipping is your problem.
>>Content-Disposition: attachment;filename=events.ics
> I see.  The browser responds to both the Google feed and our own by asking
> if you want to save or open the file, so I assumed that just answering the
> iCal data in HTML would not suffice.  I tried using just 'html html: self
> iCalData', which the browser displayed in place (vs. an open or download
> option). It also did not work with Drupal.
> Is there another way to answer the iCal contents without the
> 'Content-Dispostion'?
> What other tool can I use to view the raw data feed from the Google iCal
> URL?
> Also, I'm not sure how robust the Drupal code is, which is why we tried the
> gzip download.

If you think the code is not super robust then adding gzip to the mix
is likely going to make the problem worse.


More information about the seaside mailing list