Details
-
Bug
-
Resolution: Fixed
-
Medium
-
4.0.1
-
None
-
Operating System: All
PHP Version: All
Database and version: All
Browser (and version): All
Flash Player 10 (10.0.12.36)
Description
I installed new version of Adobe Flash Player 10.0.12.36 and noticed that flash files published in eZ Publish are not displayed. Movie is simply not loaded (at least under IE7/Vista and FF3.0.3) and after right clicking on it Flash plugin says in context menu "Movie not loaded". Old Flash Player (ver 9) didn't have any problems with it.
After some digging and testing, I found root cause of this issue - by default, eZ Publish inserts following HTTP header for all binary files:
header( "Content-disposition: attachment; filename=\"$originalFileName\"" );
above line is inside:
kernel/classes/binaryhandlers/ezfilepassthrough/ezfilepassthroughhandler.php
After removing this line movies are loaded properly.
So I did more digging over the net and found this article:
http://www.adobe.com/devnet/flashplayer/articles/fplayer10_security_changes_print.html#head32
which explains that handling of Content-Disposition header is a new "feature" of Flash Player 10.
Basically as a solution they suggest to:
a) reconfigure HTTP server to not send Content-Disposition header for trusted Flash files
b) or other dodgy workaround in Flash file itself, which as they say may not even work in certain scenarios
I tried also more elegant approach - stripping this header in .htaccess with:
<FilesMatch "\.swf$">
Header unset Content-Disposition
</FilesMatch>
but somehow it doesn't work for me
Steps to reproduce
1. Publish Flash file using Admin interface.
2. Try to view file.
3. Movie is not loaded in flash player