How to block HTTP requests if they require authentication (401)
I tried listening to the http-on-examine-response and then calling
nsIRequest::cancel and ::suspend, but neither worked the way i wanted.
The problem is that those requests force the opening of the user/pass
prompt. I want to cancel that chain of 401 -> prompt -> new request -
before the prompt is created.
Thus i need to cancel the HTTP request as soon as some data comes from
the server indicating that they want authentication (error code 401).
http-on-examine-response seems too late. Is there another way i could