title: CORS request is preflighted, but it seems like it should not be
body: <p>The following cross-origin POST request, with a content-type of multipart/form-data and only simple headers is preflighted.  According to the W3C spec, unless I am reading it wrong, it should not be preflighted.  I've confirmed this happens in Chrome 27 and Firefox 10.8.3.  I haven't tested any other browsers.</p>
  
  <p>Here are the request headers, etc:</p>
  
  <pre><code>Request URL:http://192.168.130.135:8081/upload/receiver
  Request Method:POST
  Status Code:200 OK
  Request Headersview source
  Accept:*/*
  Accept-Encoding:gzip,deflate,sdch
  Accept-Language:en-US,en;q=0.8
  Connection:keep-alive
  Content-Length:27129
  Content-Type:multipart/form-data; boundary=----WebKitFormBoundaryix5VzTyVtCMwcNv6
  Host:192.168.130.135:8081
  Origin:http://192.168.130.135:8080
  Referer:http://192.168.130.135:8080/test/raytest-jquery.html
  User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.37 Safari/537.36
  </code></pre>
  
  <p>And here is the OPTIONS (preflight) request:</p>
  
  <pre><code>Request URL:http://192.168.130.135:8081/upload/receiver
  Request Method:OPTIONS
  Status Code:200 OK
  Request Headersview source
  Accept:*/*
  Accept-Encoding:gzip,deflate,sdch
  Accept-Language:en-US,en;q=0.8
  Access-Control-Request-Headers:origin, content-type
  Access-Control-Request-Method:POST
  Connection:keep-alive
  Host:192.168.130.135:8081
  Origin:http://192.168.130.135:8080
  Referer:http://192.168.130.135:8080/test/raytest-jquery.html
  User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.37 Safari/537.36
  </code></pre>
  
  <p>The spec seems pretty clear: </p>
  
  <ul>
  <li>Only <a href="http://www.w3.org/TR/cors/#simple-header">simple headers</a>: CHECK   </li>
  <li>Only <a href="http://www.w3.org/TR/cors/#simple-method">simple methods</a>: CHECK</li>
  </ul>
  
  <p><strong>UPDATE:</strong> Here's some simple client-side code that will reproduce this:</p>
  
  <pre class="lang-js prettyprint-override"><code>var xhr = new XMLHttpRequest(),
      formData = new FormData();
  
  formData.append('myfile', someFileObj);
  
  xhr.upload.progress = function(e) {
      //insert upload progress logic here
  };
  
  xhr.open('POST', 'http://192.168.130.135:8080/upload/receiver', true);
  xhr.send(formData);
  </code></pre>
  
  <p>Does anyone know why this is being preflighted?</p>