Re: MIME type parameters
Jack Bates <[email protected]> Wed, 08 Jan 2014 11:27:54 -0800
| Newsgroups | gmane.comp.mozilla.devel.plugins |
|---|---|
| Message-ID | <[email protected]> |
On 08/01/14 09:35 AM, Benjamin Smedberg wrote: > On 1/8/2014 12:25 PM, Jack Bates wrote: >> I am unable to access certain webapps (Oracle Forms) with Firefox on >> Ubuntu because they use MIME type >> application/x-java-applet;jpi-version=1.6.0_06 >> >> The IcedTea-Web Java plugin NP_GetMIMEDescription() returns >> application/x-java-applet;jpi-version=1.6.0_50 >> >> So Firefox complains "A plugin is needed to display this content." > > This seems correct. That website is asking specifically for version > 1.6.0_06 and that's not the version you have installed. If it were > asking for something reasonable like > "application/x-java-applet;version=1.6" or even just > "application/x-java-applet" then it would work. I looked up the documented version selection behavior because I didn't know if this was correct or not. It says a request to launch an applet on a specific JRE version (for example, a particular update release like "1.5.0_11") should fall back on the latest available JRE on the machine. >> The new (Java SE 6 update 10) Sun (Oracle) Java plugin version >> selection behavior is: >> >> When considering a request to launch an applet on a specific JRE >> version (for example, a particular update release like "1.5.0_11"): >> >> The list of available JREs is consulted. If there is an exact match of >> the version string, that JRE version is selected. Otherwise, if there >> are one or more installed JREs in the same family, the latest version >> is selected. Otherwise, the latest available JRE on the machine is >> selected. > > Have you verified that this works. I am about 99% sure that this does > not work in Firefox. > > I don't think I would accept any patch to change the Firefox behavior. If you hardcode a generated list of every update release into NP_GetMIMEDescription(), then it works. Doing that conforms to the (Sun/Oracle) documented version selection behavior, so it seems right in theory. I confirm it enables users (me) to successfully access webapps in the wild (Oracle Forms) with Firefox on Ubuntu, so it seems right in practice too. (Those webapps could easily be updated to work with Firefox (either by not requesting a specific update release, or (I guess) by using an HTML attribute vs. a MIME type parameter) but users generally cannot modify these webapps, and the webapps are not obviously broken (a JRE is installed that should be selected in theory and would work in practice).) The problem is that hardcoding a generated list of every update release is "terrible" (http://thread.gmane.org/gmane.comp.java.openjdk.distro-packaging.devel/25666/focus=25670) Is there another way? (In general (hypothetically) it might even be impossible for a plugin to hardcode every possible MIME type parameter value.)