Closed
Bug 684908
Opened 13 years ago
Closed 13 years ago
Firefox saves different page source from that actually viewed.
Categories
(Toolkit :: View Source, defect)
Tracking
()
RESOLVED
FIXED
mozilla10
People
(Reporter: lothar_, Assigned: arno)
Details
Attachments
(1 file, 2 obsolete files)
1.26 KB,
patch
|
Details | Diff | Splinter Review |
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; MathPlayer 2.20) Steps to reproduce: 1. run Firefox. 2. open tab with uri: http://mises.org/articles.aspx?action=list wait for page contents to appear 3. right click on text, select "view page source". note that the page source contents reflect the viewed page 4. click toolbar "file", select "save page as", save in: Downloads, file name: mis1, "save" 5. within text of page, in the page choice list, click "2", wait for page contents to appear note that the contents are changed nota bene: page choice list looks like: " < previous page 1 2 3 4 5 6 7 8 9 10 ... of 66 next > " 6. right click on text, select "view page source". note that the page source contents reflect the viewed page 7. click toolbar "file", select "save page as", save in: Downloads, file name: mis2, "save" 8. cd to saved file directory, using ls, wc and diff, show that saved files are the same. Administrator@mobo /xp0/Documents and Settings/Administrator/My Documents/Downloads $ ls -lt mis?.aspx -rw-r--r--+ 1 Administrator None 140040 Sep 6 15:54 mis2.aspx -rw-r--r--+ 1 Administrator None 140040 Sep 6 15:53 mis1.aspx Administrator@mobo /xp0/Documents and Settings/Administrator/My Documents/Downloads $ wc mis?.aspx 1158 4659 140040 mis1.aspx 1158 4659 140040 mis2.aspx 2316 9318 280080 total Administrator@mobo /xp0/Documents and Settings/Administrator/My Documents/Downloads $ diff mis?.aspx Actual results: Firefox saved the same page source for different viewed pages. Expected results: Firefox should have saved the actual page source for each viewed page.
Do you use Save as in the Source view window or in the main Firefox menu?
I have now seen it, can confirm on FF6 Win XP. "Save as" from the View Source window has the problem. "Save page as" from the main FF menu saves correct source.
Status: UNCONFIRMED → NEW
Component: General → Networking: File
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → networking.file
Comment 3•13 years ago
|
||
This has nothing to do with file networking, just with how the UI is invoking the "save" function (as you can tell by the fact that it works fine in the browser window!).
Component: Networking: File → View Source
Product: Core → Toolkit
QA Contact: networking.file → view.source
Assignee | ||
Comment 5•13 years ago
|
||
patch proposal: pass cacheKey to the url saving procedure. XXX: I don't if gPageLoader.currentDescriptor.QueryInterface(Ci.nsISHEntry).cacheKey; can throw an error sometimes
Attachment #561664 -
Flags: review?(neil)
Comment 6•13 years ago
|
||
(In reply to arno renevier from comment #5) > XXX: I don't if > gPageLoader.currentDescriptor.QueryInterface(Ci.nsISHEntry).cacheKey; > can throw an error sometimes Neither do I, but you should just pass the page loader itself and the web browser persist object will retrieve the cache key if it can. See the documentation for nsIWebBrowserPersist's saveURI method.
Comment 7•13 years ago
|
||
https://developer.mozilla.org/en/nsIWebBrowserPersist#saveURI%28%29 (no direct link to the cache key parameter available)
Assignee | ||
Comment 8•13 years ago
|
||
thanks for feedback. Here is an updated patch passing page loader as an argument.
Attachment #561664 -
Attachment is obsolete: true
Attachment #561664 -
Flags: review?(neil)
Attachment #564057 -
Flags: review?(neil)
Comment 9•13 years ago
|
||
Comment on attachment 564057 [details] [diff] [review] patch v2: pass the page loader as an argument directly > // Strips the |view-source:| for saveURL() [I noticed a slight inaccuracy as you're now using internalSave instead.] >+ internalSave(window.content.location.href.substring(12), null, null, null, null, null, >+ "SaveLinkTitle", null, null, null, gPageLoader); [The first line is a little too long for my liking. Some potential options: a) removing "window." would help a bit b) move a couple of "null,"s to the next line c) move the five "null,"s to their own line ]
Attachment #564057 -
Flags: review?(neil) → review+
Assignee | ||
Comment 10•13 years ago
|
||
Attachment #564057 -
Attachment is obsolete: true
Assignee | ||
Updated•13 years ago
|
Keywords: checkin-needed
Updated•13 years ago
|
Assignee: nobody → arno
Comment 11•13 years ago
|
||
In my queue with a few other bits that are being sent to try first and then onto inbound :-) https://tbpl.mozilla.org/?tree=Try&rev=c1528769b893
Status: NEW → ASSIGNED
Keywords: checkin-needed
Comment 12•13 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/6e5cf287ab1e
Target Milestone: --- → mozilla10
Comment 13•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6e5cf287ab1e
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•