0

I am trying to fetch the http object content/body via registering a stream listener to channel when receiving "http-on-modify-request" notification.

var newListener = new TracingListener(this); subject.QueryInterface(Ci.nsITraceableChannel); newListener.originalListener = subject.setNewListener(newListener);

Thing goes well for normal object but redirect object.
I check a problem of firebug https://bugzilla.mozilla.org/show_bug.cgi?id=529536, which show that the listener will be moved to the redirected object. Consequently, OnDataAvailable will not be call for the original redirect object.

So is there a way to get the redirect object content/body through some other way? Any suggestion will be appreciated.

winterTTr
  • 1,739
  • 1
  • 10
  • 30

1 Answers1

0

The code for the new Web Console in Firefox 4 is what you want to copy here. Specifically, take a look at this method.

sdwilsh
  • 4,674
  • 1
  • 22
  • 20
  • I found that FF3.5 seems not have a good implementation about nsIHttpActivityDistributor, which block me always. OK, i think maybe i should move my focus on the FF3.6 or maybe FF4.0. Thanks for you help. – winterTTr Mar 16 '11 at 09:30
  • Yeah, I wouldn't focus on Firefox 3.5. It won't be supported by Mozilla much longer. I don't think 3.6 will be supported much longer after Firefox 4 too. – sdwilsh Mar 16 '11 at 18:12