backslashes in applet path are treated differently under linux compared to windows

Bug #325815 reported by Michael Jones
4
Affects Status Importance Assigned to Milestone
firefox-3.0 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

on http://www.rose-hulman.edu/~finn/courses/MA323GeomModel/TestApplets/TriangleCoonsPatchApplet.html
there is an embedded applet and its is specified this way:

                <APPLET code="patch\TriangleCoonsPatchApplet.class"
    codebase="../Applets" width=700 height=600>
                </APPLET>

the backslash in the path is handled differently under windows/linux. under windows its converted to a slash and the applet is found while under linux the applet cannot be found.

Revision history for this message
Florian Diesch (diesch) wrote :

Thank you for taking the time to report this issue and helping to make Ubuntu better.

The page contains the following code:

  <APPLET code="patch\TriangleCoonsPatchApplet.class"

This needs to be changed to

  <APPLET code="patch/TriangleCoonsPatchApplet.class"

as the path components in URLs are separated by "/" not by "\"

As this is not a bug in Ubuntu I'm converting this bug report to a support tracker question.

Revision history for this message
Michael Jones (jonesmz) wrote :

Actually, I completely disagree with you, Florian.

    This is indeed a bug. Yes, the change in the applet code DOES fix the problem, but that is not the issue in question.

    The bug that I reported is that a Java applet, which is claimed to be completely cross platform (write once, run everywhere, and so on), works in Windows but not in Linux. If the program was not supposed to work in Linux because of some problem with either Firefox or Sun java Browser plug in, or IcedTea Browser plug-in, than we need to stop claiming that the culprit in question is cross-platform. That, or we need to disclose that this special case exists, preventing this particular applet, as written, from running in Ubuntu Intrepid Ibex.

    I completely understand and agree with you that the problem is fixable. As we speak I believe that my professor has already repaired the applet. My issue is that the applet worked on Windows, and not on Linux. Any way you look at it, there is some problem with that, though not entirely necessarily the same problem from every angle.

Revision history for this message
Florian Diesch (diesch) wrote :

It's not a bug in the applet, it's a bug in the web page that contains the applet.

"\" is not allowed in URLs (see RFC 1738, chapter 2.2. "URL Character Encoding Issues") and the path components are separated by "/" (see RFC 1738, chapter 2.3 "Hierarchical schemes and relative links"), so "patch\TriangleCoonsPatchApplet.class" can't be used to reference the file "TriangleCoonsPatchApplet.class" in folder "patch".

As far as I know Internet Explorer is the only browser that replaces \ with / in URLs.

If a browser requests the URL as it is most web servers will interpret it as "file named patch\TriangleCoonsPatchApplet.class" which is different from "file named TriangleCoonsPatchApplet.class in folder patch" and most likely isn't available. So the applet in such doesn't work with such browsers because the browser gets an error from the web server when it tries to load the applet file.

Revision history for this message
Michael Jones (jonesmz) wrote :

    I understand that aspect of the problem. I have read that RFC, and several other related ones previous to this discussion.

    The class is taught to Software Engineering students, all of us with a large amount of programing experience, the large majority of us use a Linux distribution in addition to Windows on our systems. It was purely by chance that I happened to be using Linux at the time. Those students who were in Windows at the time all use Firefox 3.0, I know all of them personally and can guarantee that none of them are fans of Internet Explorer.

    Whether Firefox is RFC compliant on Linux but not on Windows remains to be verified. Regardless, the behaviour differs between the two operating systems, even after an attempt to minimize the relative differences.

Revision history for this message
Florian Diesch (diesch) wrote :

Not loading the applet is correct behavior according to the standards - the URL is invalid so there's no defined way to handle it. Just requesting the URL as it is is an obvious way of being fault tolerant which usually is a good thing for a program. Then it's up to the web server to handle it. If the web server doesn't return the applet file Firefox can't use it - and can't be blamed for that.

One may discuss if replacing "\" by "/" is correct behavior, too, but I don't think that is something to discuss here in the Ubuntu bug tracker as it is not about a bug in Ubuntu - which is why I converted the original bug report to a question.

I suggest we continue further discussion there, and if you convince me that there's something wrong with Firefox' behavior in Ubuntu I'll come back here and change to bug's status to "confirmed" but set it to "invalid" until then.

Revision history for this message
Michael Jones (jonesmz) wrote :

Hi Florian,

    Thanks for being patient with me.

    I agree with you that being standards compliant is not a bug in itself, and that standards compliance is generally a good thing. Honestly, I'm not taking issue with the applet not running. The page was written with incorrect code, so according to RFC, its behaviour was justified.

    The issue that I'm having, and the reason why I reported a bug in the first place, is that behaviour that works flawlessly in both internet explorer and firefox (I just tested this again to confirm), using a cross platform language (java) in a cross platform webbrowser (firefox), in windows, works not at all in Ubuntu Linux. I'm not saying that this specific example any one is to blame really. What I am saying is that complicated behaviour (Loading a java applet is complicated, any way you want to look at it) that works fine in one operating system that claims to support the behaviour, does not work at all in another environment that also claims to support the behaviour.

    I cant tell you if its an issue with Firefox, java, or something even unrelated. I am a software person, but I'm pretending to be a dumb user on this. I have familiarity in Windows, and Ubuntu, something that I know works in Windows, doesn't work in Ubuntu... even though operations that I consider to be effectively identical (note the second working applet I linked) does work perfectly in Linux and Windows both.

    I specifically submitted this bug report to the Ubuntu distribution of launchpad because I personally experienced this problem while using Ubuntu. I can't say if other students who were using a linux distribution other than Ubuntu encountered this same problem, though I know there are students who use other Distributions. The fact is that no one from another distribution said anything, thus I assume that the problem exists only in Ubuntu for now. Thats not to say that it does not exist outside Ubuntu, just that I cannot confirm or refute that, so I won't make the assumption.

    Honestly, my basic argument is that from a "dumb" user standpoint, a webpage that works on Windows, does not work on Linux, even though all of the necessary software is installed. Firefox is supported by Ubuntu, and is included by default as the default GDM browser. The java browser plugin is installable via add and remove programs.

    Somewhere in this situation is a bug. Is it a bug in java for windows? maybe. is it a bug in firefox for windows? maybe. Java for Ubuntu? maybe, Firefox for Ubuntu? maybe. I don't know... I don't know enough about the various components to find the actual problem. Thats why I submitted the ticket. I saw a problem, and don't know how to fix it.

Thanks again for working through this with me, I appreciate it a lot.

-Mike

Changed in firefox-3.0:
status: New → Incomplete
Revision history for this message
Michael Jones (jonesmz) wrote : Re: [Bug 325815] Re: Java applet works in windows, not in linux.

Could you please tell me why this was marked as incomplete? I was not asked
for any additional information.

On Sat, Feb 14, 2009 at 1:34 PM, John Vivirito <email address hidden> wrote:

> ** Changed in: firefox-3.0 (Ubuntu)
> Status: New => Incomplete
>
> --
> Java applet works in windows, not in linux.
> https://bugs.launchpad.net/bugs/325815
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in "firefox-3.0" source package in Ubuntu: Incomplete
>
> Bug description:
> the applet found here
>
>
> http://www.rose-hulman.edu/~finn/courses/MA323GeomModel/TestApplets/TriangleCoonsPatchApplet.html<http://www.rose-hulman.edu/%7Efinn/courses/MA323GeomModel/TestApplets/TriangleCoonsPatchApplet.html>
>
> works perfectly in windows. However it does not work at all in Ubuntu
> Intrepid Ibex on the same machine.
>
> this applet from the same course
>
>
> http://www.rose-hulman.edu/~finn/courses/MA323GeomModel/TestApplets/ThreeDC2Spline.html<http://www.rose-hulman.edu/%7Efinn/courses/MA323GeomModel/TestApplets/ThreeDC2Spline.html>
>
> works.
>
> The instructor has given permission to submit this bug report, as nearly
> a dozen students have experienced the same issue simultaneously
>
> I personally tested this using the sun java 6 plugin, as well as the
> iced-tea plugin available through add/remove programs.
>
> Please let me know if more information is needed.
>

Michael Jones (jonesmz)
Changed in firefox-3.0:
status: Incomplete → New
Michael Nagel (nailor)
description: updated
Changed in firefox-3.0:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.