Last modified: 2012-07-25 18:25:39 UTC
Browser: Firefox 6 Steps to reproduce: 1) Go to http://prototype.wikimedia.org/timedmedia/Main_Page 2) For a video with the controls, select Menu -> Download -> any option under "download text" Behaviour: The "open/save" dialog pops up, but asks to save as "index.php" instead of "whatever.srt". The filename in the HTTP header "Content-disposition: attachment; filename=$file" is not set correctly.
See also bug 21853, which is basically the same issue but for mediafiles.
I don't know if an extension is the best place for the this download proxy and setting of response headers. I would suggest this as a feature for core. Once added to core mwEmbed could use these updated download url for the captions to be downloaded and given the correct name.
Note that unlike bug 21853, these files are already being generated from the wiki -- right now simply with an action=raw and a forced content-type (which gets replaced with text/x-wiki as it's unrecognized, and since text/x-wiki isn't recognized by your browser, your browser downloads it instead of opening it inline). Of course if your browser thinks it knows how to open text/x-wiki, it may try to open your .srt download, which also doesn't have a content-disposition filename set so it downloads as index.php.
would using the new download attribute for a tags be an option here? http://html5-demos.appspot.com/static/a.download.html
Not very wide support yet, but sure.. Adding an attribute is far easier than setting up the server side headers :)
added download attribute support in https://gerrit.wikimedia.org/r/#/c/16649/ I think we can mark this fixed for now, adding in headers is complicated given the archtetural setup. and browsers should be adding download support over time.