I am working on a protocol handler for Firefox and I call the resource like that:
var ioservice = Cc["@mozilla.org/network/io-service;1"]
.getService(Ci.nsIIOService);
var uri = ioservice.newURI('http://someurl'+someparams, null, null);
The question is that I want the user to see my protocol handler – like protocol:params instead of the real URL.
The problem is that your
nsIProtocolHandler.newChannel()implementation returns a regular HTTP channel – and it is associated with an HTTP URL rather than yours. This is easy to fix however, setchannel.originalURIto your URL (the one your got as parameter tonewChannel()).Documentation: https://developer.mozilla.org/en/nsIChannel#Attributes