Re: [LAU] Under construction

From: 6c62 <6c62@email-addr-hidden>
Date: Mon Dec 14 2009 - 23:33:44 EET

Hi Will, dear list.

Folderol schrieb:
> On Mon, 14 Dec 2009 00:47:30 -0500
> This is a very curious and frustrating issue, that I've tried for ages
> to get to the bottom of. I have found that Firefox will frequently
> ignore its own 'applications' settings for no apparent reason, but not
> on all sites. Later it may just decide to handle exactly the same site
> correctly!
>
> Where possible, I've looked at the source of both correctly and
> incorrectly behaving sites and can find absolutely nothing to suggest
> what is happening.
>
> Some other browsers also seem to have issues with oggs in particular.
> The only two browsers that I've found are consistently correct on this
> issue are (ironically) IE and Opera :o
>
> If anyone knows what the problem is, I - and I've no doubt a lot of
> others - would be very keen to hear it!
>
You're right: I, too, have stumbled upon this behavior more than once. I
used to think that it's a result of a "use this option every
time"-confirmation the first time firefox presents a dialog asking what
I want to do with a file. (That's what you refer to with "'appications'
settings.)

I took the opportunity to net-search the issue and found an interesting
discussion at [1]. It seems the browsers' behavior is related to the
HTTP header that is send by the webserver when delivering the requested
file. Using the "content-disposition" header, you can declare a file an
"attachment," which lets firefox open the "save as" dialog.

Since the "content-disposition: attachment;" header is not send
automatically by Apache, you need to somehow add it. In [1], the
recommended way to do it is using a simple PHP script. You can find an
example script in the discussion. If you want to use it though, I'd
strongly recommend to add some security to it. At least, The $_REQUEST
parameter needs to be parsed to make sure the script doesn't accept
requests from a different website. Also, you may want to add a filetype
check to ensure that the script handles mp3/ogg files, only.

Please remember that all I wrote here is plain theory - I didn't test
any of this myself. Hope it helps, anyway.

Best regards,
Lutz

Links:
[1]
http://geeksandgod.com/forum/ministry-technology-q/force-browser-download-mp3s

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user
Received on Tue Dec 15 00:15:06 2009

This archive was generated by hypermail 2.1.8 : Tue Dec 15 2009 - 00:15:06 EET