title: XMLHttpRequest problem
body: <p>I am trying to do &quot;POST&quot; with XMLHttpRequest in a firefox extension, and after that I try to get the &quot;Location&quot; header and open it in a new tab. For some reason, the XMLHttpRequest doesn't contain a location header.</p>
  <h3>My code</h3>
  <pre><code>function web(url,request)
  {
      var http = new XMLHttpRequest();
      http.open('POST',url,true);
      http.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
      http.onreadystatechange=function() {
      if(http.readyState == 2) {
          alert(http.getResponseHeader(&quot;Location&quot;));
          }
      }
      http.send(request);
  }
  </code></pre>
  <p>Also, if I change the alert to getAllResponseHeaders() to see all headers, I just don't see the location header there. If I try to spy on the request of the original site with Firebug, it does show me the location header in the response. Please help me resolve my issues. Thanks :)</p>
  <p>P.S. I'm also unable to open a link in new tab using <code>window.open(url, this.window.title);</code>, but as that's not directly related to the rest of this I'll post a separate question to ask about it.</p>