Closed Bug 795905 Opened 12 years ago Closed 12 years ago

Setting proxies via applyFilter() (nsIProtocolProxyFilter) does not work anymore

Categories

(Core :: Networking: HTTP, defect)

18 Branch
x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18
Tracking Status
firefox18 + fixed

People

(Reporter: gk, Assigned: mcmanus)

References

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

Attached file applyfilter.xpi
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:10.0) Gecko/20100101 Firefox/10.0

Steps to reproduce:

I installed the attached minimal test-case which sets a non-existing proxy (127.0.0.1:9999) via applyFilter() in the latest Firefox Nightly.


Actual results:

I could surf the Internet as if I had set no proxy at all.


Expected results:

No connections should have been made.
Some further comments:
1) This is reproducible on Windows 7, Mac OS X, Ubuntu (latest) using GNOME, but NOT on Debian Wheezy with XFCE. The only (relevant) difference between the last environment and the first three ones is the missing system proxy feature. Dunno if that matters here, though.
2) The last nightly that does work properly is the one on September 27. The nightly on September 28 has already the issue at hand.
OS: Windows 7 → All
Component: Networking → Networking: HTTP
Blocks: 769764
(In reply to Georg Koppen from comment #1)
> Some further comments:
> 1) This is reproducible on Windows 7, Mac OS X, Ubuntu (latest) using GNOME,
> but NOT on Debian Wheezy with XFCE. The only (relevant) difference between
> the last environment and the first three ones is the missing system proxy
> feature. Dunno if that matters here, though.

Forget that. That was an error on my side. I can reproduce the bug on all available systems even on Debian with XFCE.
With the latest Nightly, I am not able to surf Internet, I get this message:
"The proxy server is refusing connections"
loic - what are your proxy settings?
georg, I can reproduce your report IF I have my settings set to "no proxy" which, fwiw, is not the default config. If the default "use system settings" is set then the behavior is the same on nightly and aurora.

does this match your experience?
(In reply to Patrick McManus [:mcmanus] from comment #4)
> loic - what are your proxy settings?

Use system proxy settings.

Like you, with no proxy, there are network connections.
(In reply to Loic from comment #6)
> (In reply to Patrick McManus [:mcmanus] from comment #4)
> > loic - what are your proxy settings?
> 
> Use system proxy settings.
> 

so is the system telling you to use a proxy and that proxy is not functional?

if you don't know the answer an http log will probably show it https://developer.mozilla.org/en-US/docs/HTTP_Logging

 we should probably take this to a different bug - its kind of the opposite of gerog's issue. pls file that and cc me.
I just tested with a fresh profile and the default choice in Network options was "Use system proxy settings". I'll try to do HTTP log.
Attached patch patch 0 (obsolete) — Splinter Review
Run the proxy resolution code even when configured to go direct because there might be relevant filters. This makes us consistent with previous versions of firefox (right now FF18 is in regression).
Assignee: nobody → mcmanus
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #667551 - Flags: review?(cbiesinger)
Comment on attachment 667551 [details] [diff] [review]
patch 0

Good point, I should have caught this.

Is it possible to write a unit test for this? That shouldn't be too hard...
Attachment #667551 - Flags: review?(cbiesinger) → review+
Keywords: regression
Georg,

based on comment 5 I have a patch. Can you confirm the test case using the builds found (or soon to be found) here:

http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/mcmanus@ducksong.com-7a489bddf934/

the issue was an optimization that I put in to skip the async resolve check if configured to go direct. That doesn't work because the filter mechanism is still relevant if configured to go direct.

The optimization didn't save very much, and it wasn't applicable to the default config anyhow, so I simply removed it.
(In reply to Patrick McManus [:mcmanus] from comment #5)
> georg, I can reproduce your report IF I have my settings set to "no proxy"
> which, fwiw, is not the default config. If the default "use system settings"
> is set then the behavior is the same on nightly and aurora.
> 
> does this match your experience?

Yes.
(In reply to Patrick McManus [:mcmanus] from comment #11)
> Georg,
> 
> based on comment 5 I have a patch. Can you confirm the test case using the
> builds found (or soon to be found) here:
> 
> http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/mcmanus@ducksong.
> com-7a489bddf934/

Yes, these builds are fixing the issue. Thanks.
Attached patch patch 1Splinter Review
c++ patch is the same, I just added a xpcshell test
Attachment #667551 - Attachment is obsolete: true
Attachment #667937 - Flags: review?(cbiesinger)
Attachment #667937 - Flags: review?(cbiesinger) → review+
https://hg.mozilla.org/mozilla-central/rev/0fdefdb3481d
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: