[Zope] Generating text/csv from DTML method, Mime Type?

Farrell, Troy troy.farrell@wilcom.com
Fri, 10 Nov 2000 13:31:09 -0600


I telneted into the link I gave below and here is the RESPONSE:

HTTP/1.0 200 OK
Date: Fri, 10 Nov 2000 19:26:52 GMT
Cache-Control: private
Connection: close
Content-Type: application/octet-stream
Set-Cookie: B=48be9l0t0oivt&b=2; expires=Thu, 15 Apr 2010 20:00:00 GMT;
path=/;
domain=.yahoo.com
 
"WCG",15.625,"11/10/2000","1:57PM",-1.8125,17.375,17.375,15.625,671100

So you can see that they are using the MIME type of
application/octet-stream.
They also set a cookie.  I hate cookies.

Troy
-----Original Message-----
From: Oliver Bleutgen [mailto:myzope@gmx.net]
Sent: Friday, November 10, 2000 12:37 PM
To: zope@zope.org
Subject: RE: [Zope] Generating text/csv from DTML method, Mime Type?


> I know this sounds silly, but try making the url end with .csv
> I wrote a perl cgi script some time ago that spit out a csv file.  When it
> ended with .csv, IE seemed to ignore the server's Content-type: text/html
> header.

> http://finance.yahoo.com/q?s=WCG&d=v1
> Look, my stock is falling!  Actually, if you look at the link below and to
> the right of the table, you'll see a download spreadsheet link.  Yahoo
> uses
> a &e=.csv to set the extension.  Presumably, the e value is for extension.

That isn't silly, it corresponds exactly with the description you can find
at

http://msdn.microsoft.com/workshop/networking/moniker/overview/appendix_a.as
p

There term silly seems much more suitable for that, btw.

Btw., it shows that changing the extension to .csv won't help until
one has registered an application for .csv-files in windows. 
And in fact, the "spreadsheet"-link showed up in my IE, no download window
came up...

cheers,
oliver