On Mar 28, 4:46 pm, Boris Zbarsky <[email protected]> wrote: > xunshirine wrote: > > Hello. I observe an originating request about specific google URI with > > below code. But how can I find what responseStatus will be got for the > > Google request? Firefox Overlay.js code that I use for this question > > is at: > > >http://pastebin.com/f391d3926 > > A good start is observing http-on-examine-response. > > -Boris
Thanks Boris. I know I can use http-on-examine-response but how can I be sure the responseStatus that I get on http-on-examine-response is the related to the request that I already hooked on http-on-modify- request. Say if I open up 2 Google tabs inside Firefox "at the same time", there will be 2 similar http-on-modify-request about Google.com. Then with the code on http://pastebin.com/f391d3926, I can hook those 2 Google requests. But lets assume first request will fail but the second one will succeed. So, for the first request the responseStatus will be 404 but for the second one it will be 200. But I cant find a way which Google request failed but which succeeded inside http-on-examine-response. How will I correlate request and response on http-on-examine-response? I need a solution that will tell me the responseStatus of related request. I know it sounds stupid because requests do not have responseStatus. But requests create response on server and this will generate a responseStatus. So I need that to be generated responseStatus. The code for http-on-examine-response. Some comments are inside the code: http://pastebin.com/f16e8ea2f _______________________________________________ dev-tech-network mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-network
