From 3c69094473e0a47ab7d6112dfe5964f329054533 Mon Sep 17 00:00:00 2001 From: "suresh%netscape.com" Date: Wed, 26 Mar 2003 01:19:52 +0000 Subject: [PATCH] fix for 139772 - PAC: HTTP auth support. r-dbradley, sr-darin. git-svn-id: svn://10.0.0.236/trunk@140312 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/netwerk/base/src/nsProxyAutoConfig.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mozilla/netwerk/base/src/nsProxyAutoConfig.js b/mozilla/netwerk/base/src/nsProxyAutoConfig.js index 3d57f0182b5..7c1bfe3b1ae 100644 --- a/mozilla/netwerk/base/src/nsProxyAutoConfig.js +++ b/mozilla/netwerk/base/src/nsProxyAutoConfig.js @@ -125,7 +125,21 @@ nsProxyAutoConfig.prototype = { // don't cache the PAC content channel.loadFlags |= nsIRequest.LOAD_BYPASS_CACHE; pacURL = uri.spec; + channel.notificationCallbacks = this; channel.asyncOpen(this, null); + Components.returnCode = Components.results.NS_OK; + }, + + // nsIInterfaceRequestor interface + getInterface: function(iid, instance) { + if (iid.equals(Components.interfaces.nsIAuthPrompt)) { + // use the window watcher service to get a nsIAuthPrompt impl + var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] + .getService(Components.interfaces.nsIWindowWatcher); + return ww.getNewAuthPrompter(null); + } + Components.returnCode = Components.results.NS_ERROR_NO_INTERFACE; + return null; }, // nsIStreamListener interface