title: Status code = 0 when using xhrFields: { withCredentials: true } in jQuery $ajax call with Firefox
body: <p>I'm using </p>
  
  <pre><code>xhrFields : { 
    withCredentials: true 
  } 
  </code></pre>
  
  <p>in jQuery $ajax calls, in order to send session cookies within my queries.</p>
  
  <p>The call gives a correct status code on my apache logs (401/200 depending if the cookie is set), but Firefox always receives a status=0 (i.e. an error in $.ajax())
  If I remove this xhrFields section, status code is OK (but cookies are not sent)</p>
  
  <p>Here's the response object I receive in Firefox with the xhrFields setup:</p>
  
  <pre><code>{"readyState":0,"responseText":"","status":0,"statusText":"error"}
  </code></pre>
  
  <p>My Apache config is CORS-enabled, and also allows Access-Control-Allow-Credentials (here are the corresponding HTTP headers)</p>
  
  <pre><code>Access-Control-Allow-Credentials: true
  Access-Control-Allow-Origin: *
  </code></pre>
  
  <p>Is there something missing, either in the AJAX call, or on the webserver config?</p>
  
  <p>NB: This works perfectly fine in Chrome</p>