Bug 109600 - PAC script breaks chatzilla

Bug 71565 - socks proxy doesn't work with chatzilla

Chatzilla's urls need to be standardurls, not simpleuris

r=rginda, chatzilla only
This commit is contained in:
bbaetz%student.usyd.edu.au 2002-02-18 03:53:08 +00:00
parent 5b582f5624
commit 775ea0867d
2 changed files with 11 additions and 9 deletions

View File

@ -50,8 +50,8 @@ const IRCPROT_HANDLER_CID =
/* components used in this file */
const MEDIATOR_CONTRACTID =
"@mozilla.org/rdf/datasource;1?name=window-mediator";
const SIMPLEURI_CONTRACTID =
"@mozilla.org/network/simple-uri;1";
const STANDARDURL_CONTRACTID =
"@mozilla.org/network/standard-url;1";
const ASS_CONTRACTID =
"@mozilla.org/appshell/appShellService;1";
@ -62,6 +62,7 @@ const nsICategoryManager = Components.interfaces.nsICategoryManager;
const nsIContentHandler = Components.interfaces.nsIContentHandler;
const nsIProtocolHandler = Components.interfaces.nsIProtocolHandler;
const nsIURI = Components.interfaces.nsIURI;
const nsIStandardURL = Components.interfaces.nsIStandardURL;
const nsIChannel = Components.interfaces.nsIChannel;
const nsIRequest = Components.interfaces.nsIRequest;
const nsIAppShellService = Components.interfaces.nsIAppShellService;
@ -182,10 +183,11 @@ function (aSpec, aBaseURI)
return null;
}
var uri = Components.classes[SIMPLEURI_CONTRACTID].createInstance(nsIURI);
uri.spec = aSpec;
var url = Components.classes[STANDARDURL_CONTRACTID].
createInstance(nsIStandardURL);
url.init(nsIStandardURL.URLTYPE_STANDARD, 6667, aSpec, aBaseURI);
return uri;
return url.QueryInterface(nsIURI);
}
IRCProtocolHandler.prototype.newChannel =

View File

@ -87,10 +87,10 @@ function bc_connect(host, port, bind, tcp_flag, observer)
if (!pps)
throw ("Couldn't get protocol proxy service");
var uri = Components.classes["@mozilla.org/network/simple-uri;1"].
createInstance(Components.interfaces.nsIURI);
uri.spec = "irc:" + host + ':' + port;
var ios = Components.classes["@mozilla.org/network/io-service;1"].
getService(Components.interfaces.nsIIOService);
var spec = "irc://" + host + ':' + port;
var uri = ios.newURI(spec,null);
var info = pps.examineForProxy(uri);
this._transport = this._sockService.createTransport (host, port, info,