[Zope] - Re: Re: [Zope] - RESPONSE.headers Help needed

BScherer@mobile.bam.com BScherer@mobile.bam.com
28 Dec 98 16:02:45 EST


I've got some more info that may help solve my problem.  I change the
hanlder for text/plain from Netscape to 'Save to Disk', and it worked.
This prompted me to look more closely at the headers.  This is what I
found:


HTTP/1.1 200 OK
Date: Mon, 28 Dec 1998 18:52:25 GMT
Server: Apache/1.3.3(Unix)
Content-Disposition: inline; filename=salesdat.csv
Content-Length: 501
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/plain
<--snip-->


This leads me to beleive the Bobo is ignoring or overwriting the
content-type line in my code:

RESPONSE.headers['Content-Type'] =  "text/csv"
RESPONSE.headers['Content-Disposition'] = "inline;
filename=salesdat.csv"
RESPONSE.flush()

Have we a bug here?

Thanks,

--
William K. Scherer
Sr. Member of Applications Staff
Bell Atlantic Mobile
- - - - - - - - - - - - - - Original Message - - - - - - - - - - - - - -
From: C=US/A=INTERNET/DDA=ID/zope-admin(a)zope.org
Subject: Re: [Zope] - RESPONSE.headers Help needed
Date: 12/28/98 13:00

On Mon, 28 Dec 1998, Mike Pelletier wrote:

> On Mon, 28 Dec 1998, Andreas Kostyrka wrote:
> 
> > In fact, I've had reports that seem to indicate that IE defaults to view
> > for an unknown type, and NS defaults to saving.
> > 
> > Use something like application/binary or so.
> 
>     Urk.  I hate having to lie about MIME types.  If you are using a 
> filesystem which supports MIME types, what the server reports is what the
> browser will save the file as.  Is there any other way to indicate a document
> is to be saved?
Not that I know. I don't remember reading something like this in the the
HTTP/1.1 RFC too.
You could try playing around with JavaScript (perhaps), but that seems
(even if it works) like a worse solution than lying.

(The only OS I know that knows about file types on the FS level is MacOS,
 and it doesn't know MIME types, as HFS predates MIME a bit ;) )

Andreas
-- 
Win95: n., A huge annoying boot virus that causes random spontaneous system
     crashes, usually just before saving a massive project.  Easily cured by
     UNIX.  See also MS-DOS, IBM-DOS, DR-DOS, Win 3.x, Win98.