Thank boris. You're awesome! I put in your changes and tidied it up a
little. However it still changes the url in the address bar. Is there
some other thing I need to notify when I change the originalURI?

here's the current code:

  newChannel: function(aURI)
  {
    var ios =
Components.classes[kIOSERVICE_CONTRACTID].getService(nsIIOService);

    var partURI = aURI.spec.split("@");
    var machine = partURI[0].substring(9);
    var rest = partURI[1];
    var index = rest.indexOf("/");
    var domain = rest.substring(0, index);
    var path = rest.substring(index + 1);
    nsiURI = ios.newURI("http://"; + domain + "/" + machine + "/" +
path, null, null);

    var myChannel =
ios.newChannelFromURI(nsiURI).QueryInterface(Components.interfaces.nsIHttpChannel);
    myChannel.originalURI = aURI;

    // if it comes from a link we call "http-on-modify-request"
    this.observe(null,"app-startup",null)

    return myChannel;
  },

_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network

Reply via email to