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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 27 00:04:23 PDT 2011


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





--- Comment #7 from KishoreGanesh <kbolisetty at innominds.com>  2011-09-27 00:04:23 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...

We found the above working on WebKit2 when used MiniBrowser,
But it doesnt works for me on WebKit with winlauncher.
The following code change is required on WebKit with winlauncher/safari.
$ svn diff PluginDatabase.cpp
Index: PluginDatabase.cpp
===================================================================
--- PluginDatabase.cpp  (revision 95938)
+++ PluginDatabase.cpp  (working copy)
@@ -279,8 +279,11 @@

 PluginPackage* PluginDatabase::findPlugin(const KURL& url, String& mimeType)
 {
+       PluginPackage* plugin = NULL;
     if (!mimeType.isEmpty())
-        return pluginForMIMEType(mimeType);
+                       plugin = pluginForMIMEType(mimeType);
+       if(plugin)
+        return plugin;

     String filename = url.lastPathComponent();
     if (filename.endsWith("/"))
@@ -291,7 +294,7 @@
         return 0;

     String mimeTypeForExtension = MIMETypeForExtension(filename.substring(exten
sionPos + 1));
-    PluginPackage* plugin = pluginForMIMEType(mimeTypeForExtension);
+    plugin = pluginForMIMEType(mimeTypeForExtension);
     if (!plugin) {
         // FIXME: if no plugin could be found, query Windows for the mime type
         // corresponding to the extension.

kbolisetty at IM-LP-093 ~/WebKit/Source/WebCore/plugins

Can some one suggest if changes needs to be done at both the places?

-- 
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