Closed Bug 430283 Opened 16 years ago Closed 16 years ago

Save page corrupts name of Java applet class

Categories

(Core Graveyard :: File Handling, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9.1a1

People

(Reporter: heiko.selber, Assigned: MatsPalmgren_bugz)

References

()

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b5) Gecko/2008041514 Firefox/3.0b5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b5) Gecko/2008041514 Firefox/3.0b5

When I save a web page with an applet which uses packages and is in a jar, the class of the applet is replaced by a link to a non-existing file which contans a 404 error message.

Reproducible: Always

Steps to Reproduce:
1. Save a web page with an applet, e.g.

http://www.selber.org/Applets/Mondrian.html

Actual Results:  

In the saved file, the CODE attribute of the APPLET tag was changed from

CODE="org.selber.graphics.Mondrian.class"

to

CODE="Mondrian_files/org.html".

This is not a Java class, therefore the applet fails to run when the saved page is opened with firefox.

Apparently the class name is misunderstood as a file name and modified in order to point to a name in the local directory.

This must not be done if the ARCHIVE attribute is given so that CODE points to a class in the archive, which doesn't change when saved.

Expected Results:  
The CODE attribute should not be changed:

CODE="org.selber.graphics.Mondrian.class"


I observed the bug with 3.0b5 on Ubuntu Linux 8.04 and with 2.0.0.14 on Windows XP.

I reported this to Ubuntu as

https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/217299
FWIW, there's some slightly related background info in bug 276453.
Attached patch Patch rev. 1Splinter Review
This fixes it for the URL in this bug.  I'm simply assuming that if there
is an 'archive' attribute the 'code' class is included.  I don't think
that's required by HTML4 though:
http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.4
but I would guess it's true for the vast majority of pages using
'archive', but I could be wrong.
Status: UNCONFIRMED → NEW
Component: Download Manager → File Handling
Ever confirmed: true
OS: Linux → All
Product: Firefox → Core
QA Contact: download.manager → file-handling
Hardware: PC → All
Version: unspecified → Trunk
Assignee: nobody → mats.palmgren
Attachment #317237 - Flags: superreview?(jst)
Attachment #317237 - Flags: review?(jst)
Attachment #317237 - Flags: superreview?(jst)
Attachment #317237 - Flags: superreview+
Attachment #317237 - Flags: review?(jst)
Attachment #317237 - Flags: review+
http://hg.mozilla.org/mozilla-central/index.cgi/rev/d1a6062275b8

-> FIXED
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1a1
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: