docshell puts wrong load attributes for http channel

VERIFIED FIXED

Status

()

Core
Document Navigation
P3
normal
VERIFIED FIXED
18 years ago
18 years ago

People

(Reporter: Tomi Leppikangas, Assigned: Judson Valeski)

Tracking

({embed, verifyme})

Trunk
x86
Linux
embed, verifyme
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: nsbeta2+)

(Reporter)

Description

18 years ago
If you put pref "Compare the page in the cache to the page on the network"
to "Newer", mozilla should not check pages on cache from net, but it does.

Bug seems to be on
http://lxr.mozilla.org/mozilla/source/docshell/base/nsDocShell.cpp#2658
Where is only 'case loadNormal:" but clicking on link is 'case loadLink:'
So when you click on link, loadAttribs |= nsIChannel::VALIDATE_NEVER is
not done and page is checked from net.

Fix for this is at bottom. There is also other enum cases that aren't
checked:

warning: enumeration value `loadNormalReplace' not handled in switch
warning: enumeration value `loadReloadBypassCache' not handled in switch
warning: enumeration value `loadReloadBypassProxy' not handled in switch
warning: enumeration value `loadLink' not handled in switch

Maybe those should be handled too.

Index: docshell/base/nsDocShell.cpp
===================================================================
RCS file: /cvsroot/mozilla/docshell/base/nsDocShell.cpp,v
retrieving revision 1.139
diff -u -r1.139 nsDocShell.cpp
--- docshell/base/nsDocShell.cpp        2000/06/13 23:56:29     1.139
+++ docshell/base/nsDocShell.cpp        2000/06/14 18:06:35
@@ -2667,6 +2667,7 @@
                        loadAttribs |= nsIChannel::FORCE_RELOAD;
                        break;
      case loadNormal:
+     case loadLink:
                   // Set cache checking flags
                   if ( mPrefs )
                   {

Comment 1

18 years ago
Changing assignment.

Thanks for the patch, it looks good. I'm applying it to my source, but the 
checkin will probably have to wait for M16 to go out because the tree is closed.
Status: NEW → ASSIGNED

Comment 2

18 years ago
Reassigning to myself
Assignee: locka → adamlock
Status: ASSIGNED → NEW

Updated

18 years ago
Status: NEW → ASSIGNED

Comment 3

18 years ago
Checked in. Thanks Tomi!
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
(Reporter)

Comment 4

18 years ago
Valeski's checking for #39474 removed this fix, so reopening this bug.

http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&file=nsDocShell.cpp&root=/cvsroot&subdir=mozilla/docshell/base&command=DIFF_FRAMESET&rev1=1.156&rev2=1.157

And those other missing enums should be added too, just for
clearity and shut warnings off?

(gagan say to cc him and mscott)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 5

18 years ago
bizarre. I have no idea how that happened.
Assignee: adamlock → valeski
Status: REOPENED → NEW
Keywords: embed, nsbeta2
Whiteboard: nsbeta2+
(Assignee)

Comment 6

18 years ago
fix in
Status: NEW → RESOLVED
Last Resolved: 18 years ago18 years ago
Resolution: --- → FIXED

Comment 7

18 years ago
Adding verifyme keyword.
Keywords: verifyme
(Assignee)

Comment 8

18 years ago
code level
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.