fixes bug 259429 "Proxy: Software Update does not request authentication and fails" r=biesi a=cbeard

git-svn-id: svn://10.0.0.236/trunk@177625 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
darin%meer.net 2005-08-12 02:11:03 +00:00
parent 1c570a93ce
commit 50eac5fe80

View File

@ -2167,6 +2167,22 @@ Downloader.prototype = {
prompter.showUpdateDownloaded(this._update);
}
},
/**
* See nsIInterfaceRequestor.idl
*/
getInterface: function(iid) {
// The network request may require proxy authentication, so provide the
// default nsIAuthPrompt if requested.
if (iid.equals(Components.interfaces.nsIAuthPrompt)) {
var prompt =
Components.classes["@mozilla.org/network/default-auth-prompt;1"].
createInstance();
return prompt.QueryInterface(iid);
}
Components.returnCode = Components.results.NS_ERROR_NO_INTERFACE;
return null;
},
/**
* See nsISupports.idl
@ -2174,6 +2190,7 @@ Downloader.prototype = {
QueryInterface: function(iid) {
if (!iid.equals(Components.interfaces.nsIRequestObserver) &&
!iid.equals(Components.interfaces.nsIProgressEventSink) &&
!iid.equals(Components.interfaces.nsIInterfaceRequestor) &&
!iid.equals(Components.interfaces.nsISupports))
throw Components.results.NS_ERROR_NO_INTERFACE;
return this;