Closed
Bug 243277
Opened 22 years ago
Closed 20 years ago
Offline: PAC: fails to load at startup when offline, then never tries again
Categories
(Core :: Networking, defect, P2)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: benc, Assigned: darin.moz)
References
Details
(Keywords: fixed1.8.1, Whiteboard: [FF2])
Attachments
(1 file)
|
13.50 KB,
patch
|
Biesinger
:
review+
bzbarsky
:
superreview+
bzbarsky
:
approval-branch-1.8.1+
|
Details | Diff | Splinter Review |
STEPS:
Configure PAC.
Go offline.
Quit.
Restart (assumes that "When Starting up" is in default "remember previous
offline mode")
When you start again, PAC will error in javascript console, and PAC will never load.
I still need to do more research on the behavior of PAC in cache in this situation.
Summary: Offline: PAC fails to load at startup when offline, then never tries again → Offline: PAC: fails to load at startup when offline, then never tries again
Comment 1•21 years ago
|
||
I'm unable to reproduce this problem in the latest aviary builds.
Comment 2•21 years ago
|
||
oops. Ignore that comment. wrong bug.
Comment 3•21 years ago
|
||
Combined with bug 240898 (Switching profile also switches Mozilla to work
offline), this is more severe. If a user arrives on a proxied network and
changes to a new profile (with a PAC), the "goes offline" bug prevents the PAC
from being loaded, and denies access to all proxied sites. Expert users may
guess that the proxy config URL needs to be reloaded, but others may not.
I suspect that the proxy config should be reloaded (if absent? always?) when the
browser goes (back) online.
| Assignee | ||
Updated•20 years ago
|
Severity: normal → major
Status: NEW → ASSIGNED
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → mozilla1.9alpha
| Assignee | ||
Updated•20 years ago
|
Whiteboard: [FF2]
| Assignee | ||
Updated•20 years ago
|
Priority: -- → P2
| Assignee | ||
Comment 5•20 years ago
|
||
Very straightforward error handling. If a load fails, then try again after some period of time. Increase that interval exponentially up to a configurable maximum. Try again when the PAC file is queried instead of running a nsITimer (that way we do not needlessly issue PAC loads when the browser is idle).
With this patch in place, it would be fairly trivial to add support for honoring HTTP cache expiration for the PAC file during a browser session.
Attachment #224166 -
Flags: superreview?(bzbarsky)
Attachment #224166 -
Flags: review?(cbiesinger)
| Assignee | ||
Comment 6•20 years ago
|
||
BTW, the suggestion to reload PAC when the browser goes online is actually already implemented. You can force a PAC reload today by toggling the work online/offline setting. That works on the trunk at least.
Comment 7•20 years ago
|
||
Comment on attachment 224166 [details] [diff] [review]
v1 patch
So once mLoadFailureCount is big enough (~32?) we'll try to do several PAC loads something like 5 secs apart, right? I guess that's OK, since getting to something like 32 will take a few hours, if we're doing 5 minute timeouts between loads...
Attachment #224166 -
Flags: superreview?(bzbarsky) → superreview+
| Assignee | ||
Comment 8•20 years ago
|
||
> So once mLoadFailureCount is big enough (~32?) we'll try to do several PAC
> loads something like 5 secs apart, right?
5, 10, 20, 40, 60... seconds apart, etc. Notice the left shift.
Comment 9•20 years ago
|
||
Comment on attachment 224166 [details] [diff] [review]
v1 patch
+ nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
I wonder if a necko-internal helper method to get prefs would be useful, maybe also allowing to specify a default value...
(just a random thought, not necessarily for this bug)
bz:
>So once mLoadFailureCount is big enough (~32?) we'll try to do several PAC
>loads something like 5 secs apart, right?
But the code sets interval to maxInterval if the shift returned 0, which happens after a lot of failures happened and the binary ones were shifted out of the number.
+ // Even if the PAC file could not be parsed, we did succeed in loading the
+ // data for it.
+ mLoadFailureCount = 0;
I think it would be simpler to move this to the beginning of the block. that way, reviewers don't have to make sure that there are no returns in between :->
Attachment #224166 -
Flags: review?(cbiesinger) → review+
| Assignee | ||
Comment 10•20 years ago
|
||
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 11•20 years ago
|
||
Comment on attachment 224166 [details] [diff] [review]
v1 patch
I think it would be good to get this into the 1.8 branch for FF2.
Attachment #224166 -
Flags: approval-branch-1.8.1?(bzbarsky)
Comment 12•20 years ago
|
||
Comment on attachment 224166 [details] [diff] [review]
v1 patch
I'd let it bake for another week or two; if no regressions then, let's put it on branch.
Attachment #224166 -
Flags: approval-branch-1.8.1?(bzbarsky) → approval-branch-1.8.1+
| Assignee | ||
Comment 14•20 years ago
|
||
patch reverted on 1.8 branch to try to fix orange. the problem might be due to another check-in... not sure.
Keywords: fixed1.8.1
| Assignee | ||
Comment 15•20 years ago
|
||
this patch was not the source of the orange. patch landed on 1.8 branch again.
Keywords: fixed1.8.1
You need to log in
before you can comment on or make changes to this bug.
Description
•