title: XMLHttpRequest authentication not working in Firefox
body: <p>I am trying to send an authenticated (basic authentication) POST request using XMLHttpRequest. It works in chrome and IE, but Firefox systematically returns an error 401 asking for login credentials. When I enter them the request works normally. Furthermore, I also do GET requests using the same authentication, and they work on all browsers (including Firefox).
  I use JQuery 1.7, but I have also tried without it with the same results.
  Here is the code I use:</p>
  
  <pre><code>$.ajax({
              url: [relative path],
              type: "POST",
              username: user_id,
              password: token,
              data : dataText,
              success: function(data){
                  if(data == null) alert('Error: could not send message');
                  else
                      handleUpdate(data);
              }
      });
  </code></pre>
  
  <p>or without JQuery:</p>
  
  <pre><code>var xhr = new XMLHttpRequest();
  
      xhr.open("POST", [relative path], false, user_id, token);
      xhr.setRequestHeader("Content-Type", "application/json; charset=utf-8");
      xhr.onreadystatechange = function() {
          if(xhr.readyState == 4 &amp;&amp; (xhr.status == 200 || xhr.status == 0)) {
              console.log(xhr.responseText);
          }
      }
      xhr.send(dataText);
  </code></pre>
  
  <p>In both cases, Firebug shows the requests to be of this form:
      <a href="http://user:password@absolute_url" rel="nofollow">http://user:password@absolute_url</a> (the absolute url belonging to the same domain as the website)</p>
  
  <p>Any idea of what I could be doing wrong?</p>
  
  <p>Thanks!</p>