Re: set ContentDisposition

Yves Lafon <[email protected]> Wed, 7 May 2003 15:36:14 +0200 (MEST)
Newsgroups gmane.comp.web.jigsaw
Message-ID <[email protected]>
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=3DPEWG.zip")
>
> With the debugger, the values I get after this line
> are (hope it's understandable):
>
> HttpServletResponse.reply.headers.keys[0]=3D"content-disposition"
> HttpServletResponse.reply.headers.values[0].value=3Dnull
> HttpServletResponse.reply.headers.values[0].isValid=3Dfalse
> HttpServletResponse.reply.headers.values[0].raw=3Dbyte[29]
>  (the good string)
> HttpServletResponse.reply.headers.values[0].roff=3D0
>
> Why  values[0].value=3Dnull 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 th=
e
reply on the wire). the isValid=3Dfalse is an indication here. Also if yo=
u
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,

--=20
Yves Lafon - W3C
"Baroula que barouleras, au ti=E9u toujou t'entourneras."