2 * (C) Copyright 2013 John J. Foerch
4 * Use, modification, and distribution are subject to the terms specified in the
8 define_hook("http_request_hook");
10 var http_request_observer
= {
11 observe: function (subject
, topic
, data
) {
12 if (topic
!= "http-on-modify-request")
14 subject
.QueryInterface(Ci
.nsIHttpChannel
);
15 http_request_hook
.run(subject
);
19 function http_request_hook_enable () {
20 observer_service
.addObserver(http_request_observer
,
21 "http-on-modify-request",
25 function http_request_hook_disable () {
26 observer_service
.removeObserver(http_request_observer
,
27 "http-on-modify-request");
30 http_request_hook_enable();
32 provide("http-request-hook");