Closed Bug 586908 Opened 14 years ago Closed 14 years ago

Infinite requests when proxy from system settings is redirected

Categories

(Core :: Networking, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla2.0b7
Tracking Status
blocking2.0 --- final+
blocking1.9.2 --- -
status1.9.2 --- .13-fixed
status1.9.1 --- unaffected

People

(Reporter: john.p.baker, Assigned: bjarne)

References

Details

(Keywords: regression)

Attachments

(2 files, 3 obsolete files)

Our IE PAC file used to be served from http://www.bristol.ac.uk/xyz.pac (name changed).
Several years ago it was changed to http://wwwcache.bris.ac.uk/cgi-bin/proxy.pl and a redirect put in place from the previous URL.
As we update Firefox, in the summer break, to a version defaulting to 'use system settings' for the proxy configuration, we have found some that have the old URL configured and, when Firefox is started, they will continually try to fetch the old PAC script (one last week 2 million times over a 7 hour period, one this week with 4.5 million requests) rather than use the new one.
Do I understand you correctly: If I point FF to a URL which redirects to a PAC-file, then it loops forever? Version of FF?
(In reply to comment #1)
> Do I understand you correctly: If I point FF to a URL which redirects to a
> PAC-file, then it loops forever? Version of FF?

Not quite; If you set your system setting to a PAC URL which redirects and set Firefox to use system setting then it loops forever. The PC systems team replicated on 3.6.0 and 3.6.8 - we haven't tried trunk yet; IIRC the _default_ setting was switched around 3.6.4 release.
Reproduced. Nominating for blocking.
blocking1.9.2: --- → ?
blocking2.0: --- → ?
Assignee: nobody → jduell.mcbugs
blocking2.0: ? → final+
Assignee: jduell.mcbugs → bjarne
Attached patch Fix to avoid this problem (obsolete) — Splinter Review
The problem here was that the redirected channel was trying to resolve its proxy, picked up the uri from system settings, and thus got itself into an endless loop.

nsPACMan::AsyncOnChannelRedirect() makes sure to update |nsPACMan::mPACURI| appropriately, but the code in nsProtocolProxyService::Resolve_Internal() picks up the original uri from system settings and overwrites it.
Attachment #476156 - Flags: review?(cbiesinger)
Adding timeless to CC-list since he did the work for bug #529773 and may have input here.
Comment on attachment 476156 [details] [diff] [review]
Fix to avoid this problem

r=biesi but please add a test
Attachment #476156 - Flags: review?(cbiesinger) → review+
Not blocking 1.9.2.x but we'll approve a patch with a test if you set the appropriate approval flag.
Blocks: 529773
blocking1.9.2: ? → -
Keywords: regression
Changed behaviour to return NS_OK immediately if the loop was discovered. Also added testcase for this particular problem.
Attachment #476156 - Attachment is obsolete: true
Attachment #476368 - Flags: review?(cbiesinger)
Attachment #476368 - Flags: approval1.9.0.next?
Comment on attachment 476368 [details] [diff] [review]
Slightly modified version w/ testcase

+++ b/netwerk/base/src/nsProtocolProxyService.cpp	Fri Sep 17 22:37:44 2010 +0200
+        if (mPACMan && mPACMan->IsPACURI(uri)) return NS_OK;

Please put the return on its own line, that makes debugging simpler (when stepping through or when setting a breakpoint)

+// Ensure we're using system-properties

Please indent comments to the same level as the code

+  if (failed) retval = failed;

Should that be "failed" instead of failed?
Attachment #476368 - Flags: review?(cbiesinger) → review+
Attached patch Addressed comments from reviewer (obsolete) — Splinter Review
Fixed up the last issues, carrying over the r+
Attachment #476368 - Attachment is obsolete: true
Attachment #476379 - Flags: review+
Attachment #476379 - Flags: approval1.9.0.next?
Attachment #476368 - Flags: approval1.9.0.next?
Attachment #476379 - Flags: approval1.9.0.next? → approval1.9.2.11?
Comment on attachment 476379 [details] [diff] [review]
Addressed comments from reviewer

Approved for 1.9.2.11, a=dveditz for release-drivers
Attachment #476379 - Flags: approval1.9.2.11? → approval1.9.2.11+
Seems like I forgot to request check-in...  done. I believe the patch also applies to 1.9.2.
Keywords: checkin-needed
Comment on attachment 476379 [details] [diff] [review]
Addressed comments from reviewer

We'll need a new 1.9.2 patch that either fixes the test or fixes whatever bug in the backport the test is catching.
Attachment #476379 - Flags: approval1.9.2.11+ → approval1.9.2.11-
I'll take a look. It didn't land on trunk yet?
Attached patch Patch for 1.9.2Splinter Review
The constant nsIProtocolProxyService::PROXYCONFIG_SYSTEM used by the test is undefined in 1.9.2. Test defaulted to DIRECT and failed in the cross-check to verify that redirection actually took place. Should be ok now.

(Carrying over the r+ since this is just a simple change in the test.)
Attachment #479740 - Flags: review+
Attachment #479740 - Flags: approval1.9.2.11?
Fixed syntax-error in PAC-script which seems to have been forgiven by trunk, but just for completeness.  Carrying over the r+.
Attachment #476379 - Attachment is obsolete: true
Attachment #479742 - Flags: review+
Comment on attachment 479740 [details] [diff] [review]
Patch for 1.9.2

too late for 1.9.2.11, moving to next release.
Attachment #479740 - Flags: approval1.9.2.11? → approval1.9.2.12?
With the tree in its current phase you'll probably need to actively look for a check-in buddy on IRC (or mail). The keyword alone might not get it into Firefox 4.
sorry, i was traveling on vacation for a month. but it looks like things are mostly in hand, minus the excitement of landing window hunts
Comment on attachment 479740 [details] [diff] [review]
Patch for 1.9.2

a=LegNeato for 1.9.2.12. Please land only on the mozilla-1.9.2 default branch, *not* the relbranch.
Attachment #479740 - Flags: approval1.9.2.12? → approval1.9.2.12+
Anything I need to do to move this one forward...?
Whiteboard: [needs landing]
It looks as if this was landed on trunk yesterday

http://hg.mozilla.org/mozilla-central/rev/290ad164b656
Whiteboard: [needs landing] → [landed on trunk][needs landing on 1.9.2 branch]
Target Milestone: --- → mozilla2.0b8
This still needs landing on 1.9.2 ref comment #22. Should it be marked "fixed" anyway?
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [landed on trunk][needs landing on 1.9.2 branch] → [needs landing on 1.9.2 branch]
Version: 1.9.2 Branch → Trunk
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/b3d441310e5c
Keywords: checkin-needed
Whiteboard: [needs landing on 1.9.2 branch]
Target Milestone: mozilla2.0b8 → mozilla2.0b7
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: