Vic wrote:
I'm looking for a way to log all network traffic at the http level,
including the messages buffers. Also I need to be able to link between the
sniffed HTTP conversation to the corresponding HTMLDocument in the web
browser.

I'd suggest using http-on-modify-request to intercept HTTP requests before they are sent to the server. You can QI the channel to nsIUploadChannel and get the stream, and after reading it you can QI the stream to nsISeekableStream and rewind it to position 0.


Linking channels to the corresponding HTMLDocument is hard, though... if something that's not at all guaranteed to continue working in newer versions is sufficient to you, you can get the load group's notification callbacks, which are the docshell corresponding to the caller's document. This is an implementation detail, though, and may thus change.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to