W3C home > Mailing lists > Public > www-jigsaw@w3.org > May to June 2003

Re: set ContentDisposition

From: Felicia Ionascu <feliciaionascu@yahoo.com>
Date: Wed, 7 May 2003 10:49:41 -0700 (PDT)
Message-ID: <20030507174941.59967.qmail@web14301.mail.yahoo.com>
To: Yves Lafon <ylafon@w3.org>
Cc: www-jigsaw@w3.org

It's a simple download servlet for a zip file. The
download is triggered by a submit button in a form.

With setContentType("application/zip; name=PEWG.zip")
and setHeader ("Content-Disposition","attachment;
filename=PEWG.zip"), only IE 6.0 opens the download
dialog. Netscape 7.0 displays the zip in the window
like a text file.
I read somewhere that IE 'guesses' the file type,
whilst Netscape is based on what the server says about
the file. 
Indeed, by running Jigsaw in debug mode, I discovered
that the content type of the page is text/html, so the
values that I set in the servlet seem not to be taken
into account.

If there's no bug, do I have to configure Jigsaw
somehow?

@+,
Felicia





--- Yves Lafon <ylafon@w3.org> wrote:
> On Wed, 7 May 2003, Felicia Ionascu wrote:
> 
> >
> > Hello,
> > Could someone tell me what's wrong with this code
> > (jigsaw 2.2.2)?
> >
> > response.setHeader("Content-Disposition",
> "attachment;
> > filename=PEWG.zip")
> >
> > With the debugger, the values I get after this
> line
> > are (hope it's understandable):
> >
> >
>
HttpServletResponse.reply.headers.keys[0]="content-disposition"
> >
>
HttpServletResponse.reply.headers.values[0].value=null
> >
>
HttpServletResponse.reply.headers.values[0].isValid=false
> >
>
HttpServletResponse.reply.headers.values[0].raw=byte[29]
> >  (the good string)
> > HttpServletResponse.reply.headers.values[0].roff=0
> >
> > Why  values[0].value=null when in values[0].raw
> there
> > is the right value?
> >
> > Is that a bug in jigsaw?
> 
> The value will be computed only if necessary
> (usually when serializing the
> reply on the wire). the isValid=false is an
> indication here. Also if you
> want to get the value of the header, the isValid
> boolean will be checked
> and the right value will be computed.
> response.setHeader is working (I'm using it also).
> What are you trying to do that seems to work not as
> expected?
> Regards,
> 
> -- 
> Yves Lafon - W3C
> "Baroula que barouleras, au tiéu toujou
t'entourneras."


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
Received on Wednesday, 7 May 2003 13:49:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:36 GMT