Closed
Bug 450175
Opened 16 years ago
Closed 16 years ago
check propagation of LOAD_CHECK_OFFLINE_CACHE during redirects
Categories
(Core :: Networking: HTTP, defect)
Core
Networking: HTTP
Tracking
()
RESOLVED
FIXED
People
(Reporter: dcamp, Assigned: mayhemer)
References
Details
(Keywords: fixed1.9.1)
Attachments
(1 file)
(deleted),
patch
|
Biesinger
:
review+
|
Details | Diff | Splinter Review |
As mentioned in bug 442806, the LOAD_CHECK_OFFLINE_CACHE flag is passed along after a redirect. This could lead to the LOAD_CHECK_OFFLINE_CACHE flag being passed to a load that does not have the offline-app permission.
Flags: blocking1.9.1?
Assignee | ||
Updated•16 years ago
|
Assignee: dcamp → honzab
Assignee | ||
Comment 1•16 years ago
|
||
This adds to nsDocShell (the same class that sets LOAD_CHECK_OFFLINE_CACHE flag during initial load) check for new URI having offline application permission on redirect.
Attachment #336392 -
Flags: review?(bzbarsky)
Updated•16 years ago
|
Attachment #336392 -
Flags: review?(bzbarsky) → review?(cbiesinger)
Comment 2•16 years ago
|
||
Comment on attachment 336392 [details] [diff] [review]
v1
I'm not at all sure that this notification fires at the right time to do this (or at least is guaranteed to do so). Hooking into the actual "we're setting up the redirect channel" notification seems like it would be better, but really Christian is the one who knows about this stuff...
Assignee | ||
Comment 3•16 years ago
|
||
(In reply to comment #2)
> (From update of attachment 336392 [details] [diff] [review])
> I'm not at all sure that this notification fires at the right time to do this
> (or at least is guaranteed to do so). Hooking into the actual "we're setting
> up the redirect channel" notification seems like it would be better, but really
> Christian is the one who knows about this stuff...
The callback is invoked right from the place "we're setting up the redirect channel". I put the code to the callback - the class - that originally sets the LOAD_CHECK_OFFLINE_CACHE on the original channel. As Dave Camp said, nsDocShell has to take care of this flag, not the channel itself.
Comment 4•16 years ago
|
||
(In reply to comment #2)
> (From update of attachment 336392 [details] [diff] [review])
> I'm not at all sure that this notification fires at the right time to do this
> (or at least is guaranteed to do so). Hooking into the actual "we're setting
> up the redirect channel" notification seems like it would be better, but really
> Christian is the one who knows about this stuff...
Yeah, OnChannelRedirect directly calls this. This should be fine.
Comment 5•16 years ago
|
||
Comment on attachment 336392 [details] [diff] [review]
v1
+ aNewChannel->SetLoadFlags
+ (loadFlags & ~nsICachingChannel::LOAD_CHECK_OFFLINE_CACHE);
I think more common style is to put the ( on the previous line
Attachment #336392 -
Flags: review?(cbiesinger) → review+
Reporter | ||
Comment 6•16 years ago
|
||
I wonder if it would be a safer contract to have the channel not propagate LOAD_CHECK_OFFLINE_CACHE by default, and require docshell to set it appropriately in its redirect handler.
Comment 7•16 years ago
|
||
That might not be a bad idea.
Updated•16 years ago
|
Flags: blocking1.9.1? → blocking1.9.1+
Reporter | ||
Comment 8•16 years ago
|
||
This fix (not propagating LOAD_CHECK_OFFLINE_CACHE on a redirect) was included as part of the patch for 445544.
Updated•16 years ago
|
Keywords: fixed1.9.1
You need to log in
before you can comment on or make changes to this bug.
Description
•