title: XHR request changes response based on file extension
body: <p>I have a binary file that contains an Uint8 array <em>[0,1,2,3,4,5]</em>.</p>
  
  <p>If I name it <strong>test.txt</strong> and load it everything is fine. However if I change its extension name to <strong>test.bpg</strong> the loaded data is [1,4].</p>
  
  <p>What could make this happen? It doesn't happen when I run the file on local host (note only firefox will let me do this because of cross origin security).</p>
  
  <p>However when I upload it to the server the strange responses start happening. I never configured the server to do anything special with either .txt files or .bpg files. It's just a standard nginx install.</p>
  
  <p>In case you want to see some code I am retrieving that file like this:</p>
  
  <pre><code>var request = new XMLHttpRequest;
  request.open("GET", 'test.txt', true);
  request.responseType = "arraybuffer";
  request.onload = (function(event) {
      var data = request.response;
      var array = new Uint8Array(data);
      console.log(array);
  });
  request.send(null)
  </code></pre>
  
  <p>Any help would be much appreciated!</p>