title: httpChannel.redirectTo() infinite load
body: <p>I'm working on a firefox extension for the first time, and thanks to the documentation, it's going on pretty fast.
  I've a problem however : I wan't to redirect the users if they go on some domains.</p>
  
  <pre><code>const {Cc, Ci, Cr, Cu} = require("chrome");
  const buttons = require('sdk/ui/button/action');
  const tabs = require("sdk/tabs");
  
  
  
  var httpRequestObserver =
  {
    observe: function(subject, topic, data)
    {
      if (topic == "http-on-modify-request") {
      var httpChannel = subject.QueryInterface(Ci.nsIHttpChannel);
      var eTLDService = Cc["@mozilla.org/network/effective-tld-service;1"].getService(Ci.nsIEffectiveTLDService);
      var suffix = eTLDService.getPublicSuffixFromHost(httpChannel.originalURI.host);
      var regexp = new RegExp('google\.'+suffix,'i');
      if (regexp.test(httpChannel.originalURI.host)) {
              Cu.import("resource://gre/modules/Services.jsm");
              httpChannel.redirectTo(Services.io.newURI("http://test.tld", null, null));
          }
  
  
       }
  
  
  
    get observerService() {
      return Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService);
    },
  
    register: function()
    {
      this.observerService.addObserver(this, "http-on-modify-request", false);
    },
  
    unregister: function()
    {
      this.observerService.removeObserver(this, "http-on-modify-request");
    }
  };
  
  httpRequestObserver.register();
  </code></pre>
  
  <p>I'm trying to do a little POC, but it seems to load indefinitely.</p>
  
  <p>Do you know what I am doing wrong?</p>