<div>Hello,</div><div>We&#39;re trying to provide an iCal feed from Seaside (on VW) to Drupal.  The Drupal use of the feed can be tested using a Google calendar iCal feed, and it works fine.  We&#39;re able to produce a simple iCal document as well, but Drupal does not accept it.  Both the Google and our Seaside iCal feeds download fine with just the browser.</div>
<div><br></div><div>The one big difference we can see in the header is that the Google contains &#39;Content-Encoding: gzip&#39; and ours does not.  I have not be able to determine how we can properly provide the gzip compressed version of the content.  </div>
<div><br></div><div>Has anyone done an iCal feed from Seaside to Drupal?  Or, how can I get the gzip properly to be properly supported in my data source? </div><div><br></div><div>Thanks for any help,</div><div>Bob Nemec</div>
<div>Cherniak Software</div><div><br></div><div>----</div><div>Here are some details... </div><div>Documentation on iCal in Drupal ... </div><div><a href="http://drupal.org/node/341716">http://drupal.org/node/341716</a> </div>
<div><a href="http://www.drupalove.com/drupal-video/ical-events-nodes">http://www.drupalove.com/drupal-video/ical-events-nodes</a></div><div><br></div><div>I&#39;m packaging the response with... (aFilename=events.ics, aContent is a read stream on the string)</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>WAResponse new</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>contentType: &#39;text/calendar;charset=utf-8&#39;;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>doNotCache;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>headerAt: &#39;Content-Disposition&#39; put: &#39;attachment; filename=&quot;&#39; , aFileName , &#39;&quot;&#39;;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>headerAt: &#39;Content-length&#39; put: aContents size printString;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>contents: aContents;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>yourself</div><div><br></div><div>It looks like SeasideHttpWriteHandler&gt;&gt;prepareStream:forMessageBody: will do the compression with GZipWriteStream if useGZipTransfer = true, but I can&#39;t find a way to propagate that setting, and so far none of my attempts at hacking it are working.  I had hoped something as simple as adding #headerAt: &#39;Content-Encoding&#39; put: &#39;gzip&#39; would work, but that just creates an invalid file. </div>
<div><br></div><div>To see the header contents, we use the Live HTTP headers Firefox plug in. </div><div><br></div><div>This is the Google header... </div><div><br></div><div><a href="http://www.google.com/calendar/ical/">http://www.google.com/calendar/ical/</a>&lt;our test calendar ics file&gt;</div>
<div><br></div><div>GET /calendar/ical/&lt;our test calendar ics file&gt; HTTP/1.1</div><div>Host: <a href="http://www.google.com">www.google.com</a></div><div>User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)</div>
<div>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</div><div>Accept-Language: en-us,en;q=0.5</div><div>Accept-Encoding: gzip,deflate</div><div>Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7</div>
<div>Keep-Alive: 300</div><div>Connection: keep-alive</div><div>Cookie: &lt;some cookie data&gt;</div><div><br></div><div>HTTP/1.x 200 OK</div><div>Content-Type: text/calendar; charset=UTF-8</div><div>Cache-Control: no-cache, no-store, max-age=0, must-revalidate</div>
<div>Pragma: no-cache</div><div>Expires: Fri, 01 Jan 1990 00:00:00 GMT</div><div>Date: Mon, 21 Sep 2009 00:14:03 GMT</div><div>Content-Encoding: gzip</div><div>X-Content-Type-Options: nosniff</div><div>X-Frame-Options: SAMEORIGIN</div>
<div>Content-Length: 3421</div><div>Server: GFE/2.0</div><div>----------------------------------------------------------</div><div><br></div><div>And this is our Seaside header... </div><div><br></div><div><a href="http://localhost:48199/seaside/Test">http://localhost:48199/seaside/Test</a></div>
<div><br></div><div>GET /seaside/Test HTTP/1.1</div><div>Host: localhost:48199</div><div>User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)</div><div>
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</div><div>Accept-Language: en-us,en;q=0.5</div><div>Accept-Encoding: gzip,deflate</div><div>Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7</div><div>
Keep-Alive: 300</div><div>Connection: keep-alive</div><div>Referer: <a href="http://localhost:48199/seaside">http://localhost:48199/seaside</a></div><div>Cookie: &lt;some cookie data&gt;</div><div><br></div><div>HTTP/1.x 200 OK</div>
<div>Expires: Wed, 11 Jun 1980 08:00:00 -0400</div><div>Cache-Control: no-cache,must-revalidate</div><div>Pragma: no-cache</div><div>Content-Disposition: attachment;filename=events.ics</div><div>Content-Type: text/calendar;charset=utf-8</div>
<div>Content-Length: 10944</div><div>----------------------------------------------------------</div><div><br></div><div><br></div><div><br></div><div><br></div><div>WAKomCompressed&gt;&gt;convertResponse: aResponse </div>
<div>        | response gzip stream | </div><div>        response := super convertResponse: aResponse. </div><div>        response fieldAt: &#39;Content-Encoding&#39; put: &#39;gzip&#39;. </div><div>        gzip := GZipWriteStream on: (stream := RWBinaryOrTextStream on: &#39;&#39;). </div>
<div>        gzip nextPutAll: aResponse contents contents; close. </div><div>        ^ response contents: stream reset </div><div><br></div>