Last modified: 2012-07-25 18:25:39 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T32564, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30564 - Downloading subtitles asks to save "index.php" instead of the real filename
Downloading subtitles asks to save "index.php" instead of the real filename
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
TimedMediaHandler (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Michael Dale
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-25 08:13 UTC by MER-C
Modified: 2012-07-25 18:25 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description MER-C 2011-08-25 08:13:41 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.
Comment 1 Derk-Jan Hartman 2011-08-25 11:43:20 UTC
See also bug 21853, which is basically the same issue but for mediafiles.
Comment 2 Michael Dale 2011-08-25 17:46:04 UTC
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.
Comment 3 Brion Vibber 2011-09-08 18:55:00 UTC
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.
Comment 4 Jan Gerber 2012-07-24 22:09:32 UTC
would using the new download attribute for a tags be an option here? http://html5-demos.appspot.com/static/a.download.html
Comment 5 Michael Dale 2012-07-24 22:11:16 UTC
Not very wide support yet, but sure.. Adding an attribute is far easier than setting up the server side headers :)
Comment 6 Michael Dale 2012-07-25 18:25:39 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links