fi wrote: > Now handleContent is called. But how do I get the Content of the > response? I can QI nsIRequest to nsICannel, but calling open() or > asyncOpen() throws an exception. I cannot find any appropriate help in > the source code.
well, the short answer is 'you cannot'. there are 2 options to get the content here: - from your nsIContentHandler component, you stop the transfer as soon as you detect your mimetype and recreate a new connection to the same url from a channel you created by yourself - use a nsIContentListener component rather than a nsIContentHandler. there you can provide your own nsIStreamListener from nsIContentListener.doContent method and capture the content from the incoming data stream. hope that helps. _______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
