On Sun, 2002-02-03 at 07:53, rob wrote:
> I tried the following
>
> request.setHeader("Content-Disposition", "attachment; filename="mypdf.pdf");
>
> and it seemed to work, is this the correct way or is there a more
> appropriate way to do this?
>
> Thanks
>
That is the correct way. I've had to use a "fake" mime-type to get this
to work with all versions of IE, though (like
"application/x-vnd-yourcompany"). See RFC 2616 for more info:
19.5.1 Content-Disposition
The Content-Disposition response-header field has been proposed as a
means for the origin server to suggest a default filename if the user
requests that the content is saved to a file. This usage is derived from
the definition of Content-Disposition in RFC 1806 [35].
content-disposition = "Content-Disposition" ":"
disposition-type *( ";" disposition-parm )
disposition-type = "attachment" | disp-extension-token
disposition-parm = filename-parm | disp-extension-parm
filename-parm = "filename" "=" quoted-string
disp-extension-token = token
disp-extension-parm = token "=" ( token | quoted-string )
An example is
Content-Disposition: attachment; filename="fname.ext"
--g
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>