Closed Bug 220776 Opened 21 years ago Closed 21 years ago

[FIX]Frameset in jar file failed to be shown

Categories

(SeaMonkey :: General, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.5final

People

(Reporter: sliu, Assigned: bzbarsky)

References

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20030925
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20030925

If all jdk api help is in a jar file.
open it with jar protocol and with "frameset" mode.
you can see all the frame shown blank 

Reproducible: Always

Steps to Reproduce:
1.Locate:   jar:file:///D:/JBuilder9/doc//jdk_docs.jar!/java/api/index.html
2.
3.
Please attach a testcase to this bug.
I am not sure if here is the right place to post a testcase... 
anyway:

1. Find a jar file consists of some JAVA api, SUN's JDK api is an example easy
to be found. Lets suppose it is "D:\JBuilder9\doc\jdk_docs.jar"

2. Now, visit  
"jar:file:///D:/JBuilder9/doc//jdk_docs.jar!/java/api/index.html" in Mozilla 1.5 RC2

3. You can see there are 3 frames shown, but all of them shown empty.




This bug does not exist in Mozilla 1.4 I used before. Mozilla 1.4 will shown 3
frames with right contents in them.
Easier steps to  reproduce this bug:

1. In "C:\temp" create 3 files
   c:\temp\index.html
   c:\temp\left.html
   c:\temp\right.html
2. edit "c:\temp\index.html" to:
   <pre>
      <frameset cols="50%,50%">
	<frame src="left.html">
	<frame src="right.html">
    </frameset
   </pre>
3. edit "c:\temp\left.html" to:
    <pre>
      <h1> This is LEFT</h1>
    </pre>
4. edit "c:\temp\right.html" to:
    <pre>
       <h1> This is RIGHT</h1>
    </pre>
5. Open "C:\temp\index.html" in Mozilla 1.5 RC2, you will see 2 frames  
showing "This is LEFT" and "This is RIGHT".

6. Now, jar them together:
    <pre>
     cd c:\temp
     jar cvf test.jar *.html
    </pre>

7. Open index.html in test.jar within Mozilla 1.5 RC2
    jar:file:///C:/temp/test.jar!/index.html
   You will see there are 2 frames showing nothing.


Again, this bug does not exist in Mozilla 1.4

Very sorry, I didn't know it was unneccessary to add "<pre>..</pre>"
to html sections in my post.  it is the first bug I post here.

So, the right easier testcase should be:


1. In "C:\temp" create 3 files
   c:\temp\index.html
   c:\temp\left.html
   c:\temp\right.html
2. edit "c:\temp\index.html" to:
      <frameset cols="50%,50%">
	<frame src="left.html">
	<frame src="right.html">
    </frameset
3. edit "c:\temp\left.html" to:
      <h1> This is LEFT</h1>
4. edit "c:\temp\right.html" to:
       <h1> This is RIGHT</h1>
5. Open "C:\temp\index.html" in Mozilla 1.5 RC2, you will see 2 frames  
showing "This is LEFT" and "This is RIGHT".

6. Now, jar them together:
     cd c:\temp
     jar cvf test.jar *.html

7. Open index.html in test.jar within Mozilla 1.5 RC2
    jar:file:///C:/temp/test.jar!/index.html
   You will see there are 2 frames showing nothing.


Again, this bug does not exist in Mozilla 1.4
Since you seem to have a jar file showing the problem, could you just attach it
to this bug using the "Create a New Attachment" link.
Download the attachment and save it as "C:\temp\test.jar"

Visit 
jar:file:///C:/temp/test.jar!/index.html

in both Mozilla 1.5RC2 and Mozilla 1.4 to see the difference.
Attached patch PatchSplinter Review
This is caused by the change to the frame-detection algorithm that assumes that
all URIs will succeed when you call GetPath() on them.	Jar URIs happened to
fail. This patch fixes them to return a useful path for GetPath().
Attachment #132481 - Flags: superreview?(darin)
Attachment #132481 - Flags: review?(timeless)
Taking.  This is a pretty simple change that we may want for 1.5 to unbreak
framesets in jar files.  Last I checked, IBM & co. were pretty keen on things
like that....
Assignee: general → bzbarsky
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking1.5?
OS: Windows 2000 → All
Priority: -- → P1
Hardware: PC → All
Summary: Frameset in jar file failed to be shown → [FIX]Frameset in jar file failed to be shown
Target Milestone: --- → mozilla1.5final
Attachment #132481 - Flags: review?(timeless) → review+
Flags: blocking1.5? → blocking1.5+
Flags: blocking1.5+ → blocking1.5?
I believe that it is related to this bug - a JAR url is not loaded into a
frameset as well. Since this is a workaround to execute signed code from a
remote dynamic (jsp) application, this bug will totally break such an application.
Attachment #132481 - Flags: superreview?(darin) → superreview+
Flags: blocking1.5?
Fix checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment on attachment 132481 [details] [diff] [review]
Patch

Could this please be approved for 1.5?	This just makes jar: uris not throw an
exception when you try to get the path from them.  The path is used to prevent
runaway frameset recursion, and the error return prevents frames which point to
jar: uris from working....

Very safe patch that only affects people who call GetPath() on a jar: uri (and
only adversely affects those who expect such a call to fail).
Attachment #132481 - Flags: approval1.5?
Comment on attachment 132481 [details] [diff] [review]
Patch

1.5 shipped. removing obsolete request.
Attachment #132481 - Flags: approval1.5?
*** Bug 224056 has been marked as a duplicate of this bug. ***
*** Bug 245438 has been marked as a duplicate of this bug. ***
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: