On Fri, Jul 26, 2002 at 10:56:21PM -0400, Vadim Gritsenko wrote:
> > From: Tammo van Lessen [mailto:[EMAIL PROTECTED]]
> > 
> > Hello,
> > 
> > i've a question about sending response headers in a reader. I would
> > like to send a file to the browser with an other filename than the
> > request url.
> > 
> > Ex: Request: 20020302.store will be saved as test.zip
> > 
> > I think, this could be done with the Content-Disposition header
> > field, but I dont know, where I have to set it in the reader!
> 
> From HttpHeaderAction.java:
> 
> * This action adds HTTP headers to the response.
> 
> Sound like what you need. Sitemap will be close to:
> 
> <map:act type="set-header">
>   <map:parameter name="Content-Disposition" value="test.zip"/>
> </map:act>

Or to be more RFC-compliant:

Content-Disposition: attachment ; filename=test.zip

I found this works beautifully in Mozilla, but not at all in IE5.5,
which seems to ignore the Content-Disposition altogether. 

--Jeff

> Vadim
> 
> 
> > 
> > Does anybody have an example for me?
> > 
> > Thanks
> >   Tammo
> > 

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to