In regard to "content-disposition"........

The following RFC states (very late in the text in the section on
"Security")........

  In general, the receiving MUA should not name or place the file such
  that it will get interpreted or executed without the user explicitly
  initiating the action.

http://www.ietf.org/rfc/rfc2183.txt

So - while it may seem like "content-disposition" is an answer, a "well
behaved" MIME-type interpreter should still ask the user what they want to
do with the file.  So, this still does not (or at least should not) allow an
MP3 (or any other file) to be run or executed without the users
intervention.  At minimum, the behaviour for "content-disposition" is not
"guaranteed".

In fact, some browsers continue to be "naughty" in that they actually
DOWNLOAD the file first (to some temporary location), then fire up an
appropriate application to handle the MIME type against the downloaded file
rather than running the handling application as a plug-in (freestanding or
embedded) and passing it the address/URL of the resource to process.

Regards,
Gary


On 6/13/07, "C. Bergström" <[EMAIL PROTECTED]> wrote:

Lea de Groot wrote:
> On Wed, 13 Jun 2007 15:40:39 +0530, SJL wrote:
>
>> I have this problem where i want to force download and mp3 and mp4
>> format file, but by default the browsers are handling it.
>> I actually want the "save as" window to appear and give the choice to
>> the viewer.
>>
>
> Zipping the file is the only way I know of to ensure a download.
>
Have you tried adding a header with something similar to below..

Response.AppendHeader("Content-Disposition","attachment; filename=\"" +
strFileToDownload + "\"");
Response.ContentType = "audio/mpeg";

./C


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************




*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to