title: Ajax response status is 0
body: <p>I have a resource on my local jsboss server: <a href="http://x.x.x.x:8080/webapis/" rel="nofollow">http://x.x.x.x:8080/webapis/</a></p>
  
  <p>When I run this URL through Mozilla RESTClient (addon), I get the response:</p>
  
  <pre><code>Status Code: 200 OK
  Content-Length: 160
  Content-Type: application/vnd.collection+json
  </code></pre>
  
  <p>And by running it through the normal browser window, the response is saved in the form of a file.</p>
  
  <p>Now, I created a simple html file which is calling this resource via ajax:</p>
  
  <pre><code>var x=new XMLHttpRequest();
  x.onreadystatechange=function() {
      if(x.readyState==4 &amp;&amp; x.status==200) {
          alert(x.responseText);
      }
  }
  x.open("GET","http://x.x.x.x:8080/webapis/", true);
  x.setRequestHeader("Content-Type", "application/vnd.collection+json");
  x.send();
  </code></pre>
  
  <p>When I execute this file, I'm getting a status of 0 and my response content is empty. Can someone please tell me what the problem is? TIA</p>