[Webkit-unassigned] [Bug 68789] Unable to play flash with mime type "application/octet-stream"

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 26 23:39:01 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=68789


KishoreGanesh <kbolisetty at innominds.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kbolisetty at innominds.com




--- Comment #6 from KishoreGanesh <kbolisetty at innominds.com>  2011-09-26 23:39:00 PST ---
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > Both in WK1 and WK2? 
> > 
> > Yes
> > 
> > >What if you use another unknown MIME type?
> > 
> > I changed the MIME type to 'invalid'. Firefox continues to load the plug-in, likely due to the .swf file extension. Chrome on the other hand starts displaying the missing plug-in indicator, so it appears to give special meaning to 'application/octet-stream'.
> 
> In PluginInfoStore::findPlugin in WebKit2, we are supposed to fall back to the file extension if no plug-in claims to handle the MIME type. However, we currently only do that if there is no MIME type specified!
> 
> Something like:
> 
> Index: UIProcess/Plugins/PluginInfoStore.cpp
> ===================================================================
> --- UIProcess/Plugins/PluginInfoStore.cpp    (revision 95980)
> +++ UIProcess/Plugins/PluginInfoStore.cpp    (working copy)
> @@ -193,7 +193,7 @@
> 
>      // Next, check if any plug-ins claim to support the URL extension.
>      String extension = pathExtension(url).lower();
> -    if (!extension.isNull() && mimeType.isEmpty()) {
> +    if (!extension.isNull()) {
>          PluginModuleInfo plugin = findPluginForExtension(extension, mimeType);
>          if (!plugin.path.isNull())
>              return plugin;
> 
> should probably fix the bug. Not sure if the HTML5 spec clarifies any of this...

(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > Both in WK1 and WK2? 
> > 
> > Yes
> > 
> > >What if you use another unknown MIME type?
> > 
> > I changed the MIME type to 'invalid'. Firefox continues to load the plug-in, likely due to the .swf file extension. Chrome on the other hand starts displaying the missing plug-in indicator, so it appears to give special meaning to 'application/octet-stream'.
> 
> In PluginInfoStore::findPlugin in WebKit2, we are supposed to fall back to the file extension if no plug-in claims to handle the MIME type. However, we currently only do that if there is no MIME type specified!
> 
> Something like:
> 
> Index: UIProcess/Plugins/PluginInfoStore.cpp
> ===================================================================
> --- UIProcess/Plugins/PluginInfoStore.cpp    (revision 95980)
> +++ UIProcess/Plugins/PluginInfoStore.cpp    (working copy)
> @@ -193,7 +193,7 @@
> 
>      // Next, check if any plug-ins claim to support the URL extension.
>      String extension = pathExtension(url).lower();
> -    if (!extension.isNull() && mimeType.isEmpty()) {
> +    if (!extension.isNull()) {
>          PluginModuleInfo plugin = findPluginForExtension(extension, mimeType);
>          if (!plugin.path.isNull())
>              return plugin;
> 
> should probably fix the bug. Not sure if the HTML5 spec clarifies any of this...


Though HTML5 doesn’t talks about plugin support or implementation, it is redirects to Gecko Plugin API reference http://dev.w3.org/html5/spec/Overview.html#refsNPAPI & https://developer.mozilla.org/en/Gecko_Plugin_API_Reference .
I could find the below statement from https://developer.mozilla.org/en/Gecko_Plugin_API_Reference/Plug-in_Basics#Plug-in_display_modes
“A full-page plug-in is a visible plug-in that is not part of an HTML page. The server looks for the media (MIME) type registered by a plug-in, based on the file extension, and starts sending the file to the browser.”
So It’s not a bad idea to fall back to file extension if no plugin claims to handle the specified mimetype.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list