Closed
Bug 249107
Opened 20 years ago
Closed 20 years ago
directory listings coming from session history (cache?) displayed in raw form
Categories
(Core :: Networking, defect)
Tracking
()
VERIFIED
FIXED
mozilla1.8alpha2
People
(Reporter: dbaron, Assigned: Biesinger)
References
()
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
3.77 KB,
patch
|
jst
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
A directory listing displayed because the user presses back or forward is displayed in raw form rather than in HTML-ized form. Steps to reproduce: * load file:/// * click on a directory * hit the back button Actual results: * garbage that vaguely resembles the directory listing Expected results: * HTML directory listing I'm seeing this in a FF trunk build from a few days ago. Others on IRC see it as well.
Assignee | ||
Comment 1•20 years ago
|
||
most likely caused by bug 247607
Comment 3•20 years ago
|
||
I blame http://lxr.mozilla.org/seamonkey/source/xpfe/components/directory/nsDirectoryViewer.cpp#1492 and http://lxr.mozilla.org/seamonkey/source/xpfe/components/directory/nsDirectoryViewer.cpp#1446
Assignee | ||
Comment 4•20 years ago
|
||
so... this is caused by combining the patches from Bug 214626 with bug 247607 The former one means that docshell sets the content type of channels from session history. the latter means that the conversion http-index-format -> html is now triggered by the channel's content type.
Assignee | ||
Comment 5•20 years ago
|
||
this patch would make this bug go away. it'd also mean that after following an <a type="foo/bar" href="42"> link, then going elsewhere, then going back, the 42 page may now be rendered as a different content type...
Assignee | ||
Comment 6•20 years ago
|
||
*** Bug 249209 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 7•20 years ago
|
||
this is better. does not regress <a type="..."> session history.
Attachment #151969 -
Attachment is obsolete: true
Assignee | ||
Updated•20 years ago
|
Attachment #152032 -
Flags: superreview?(darin)
Attachment #152032 -
Flags: review?(jst)
Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
Comment 8•20 years ago
|
||
biesi: care to explain why this patch works?
Assignee | ||
Comment 9•20 years ago
|
||
"pretty well" more seriously: Before, docshell got the content type off the channel, and stored it in session history (the AddToSessionHistory part of this patch). Later, after hitting back, the content type was read from the session history entry and set on the channel as a content type hint (i.e. before opening it) (nsDocShell::LoadHistoryEntry) since this is a file: uri, it then reported the content type that was set as a hint on it as its type - text/html. unfortunately this is really an http-index stream. So, I'm changing it so that I'm only storing the content type _hint_ in session history, not what the channel reported as its actual type, and am re-setting that hint as the new hint when clicking back. since directory listings, like most loads, do not have such a hint set, no hint gets set, and the file channel reports http-index-format as its type, and everything works as expected.
Assignee | ||
Comment 10•20 years ago
|
||
(In reply to comment #9) > "pretty well" (aw, you wrote "why" not "how". oh well)
Comment 11•20 years ago
|
||
Comment on attachment 152032 [details] [diff] [review] patch v2 sr=darin
Attachment #152032 -
Flags: superreview?(darin) → superreview+
Comment 12•20 years ago
|
||
Comment on attachment 152032 [details] [diff] [review] patch v2 r=jst
Attachment #152032 -
Flags: review?(jst) → review+
Assignee | ||
Comment 13•20 years ago
|
||
Checking in nsDocShell.cpp; /cvsroot/mozilla/docshell/base/nsDocShell.cpp,v <-- nsDocShell.cpp new revision: 1.603; previous revision: 1.602 done Checking in nsDocShell.h; /cvsroot/mozilla/docshell/base/nsDocShell.h,v <-- nsDocShell.h new revision: 1.152; previous revision: 1.151 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•20 years ago
|
Flags: blocking1.8a2?
Comment 15•20 years ago
|
||
*** Bug 275765 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•