views:

70

answers:

2

How can I make an http passthrough pluggable protocol for IE work in Firefox?

Alternatively, how to develop one for Firefox? Any examples would be appreciated.

Thanks.

A: 

On Firefox, if you would like to bypass a default behavior in a "pluggable" manner, you could write an NPAPI based plugin. Let's say that the documentation is thin on this subject... but to get you started, you could consult this.

With an NPAPI plugin, you have access to the whole OS and thus are free to expose any other resources to Firefox.

jldupont
A: 

Write an XPCOM object that implements nsIObserver. Then create listener for http-on-modify-request and http-on-examine-response.

var myObj = new MyObserver(); //implements nsIObserver
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
observerService.addObserver(myObj "http-on-modify-request",   false);
observerService.addObserver(myObj, "http-on-examine-response", false);
MaxK