title: Options Request Successful but still getting Access-Control-Allow-Origin Error
body: <p>I am making a DELETE request from a Backbone application and am not sure why it fails with the error shown below.</p>
  
  <h2>OPTIONS Header</h2>
  
  <p>Here is my OPTIONS header which is a 200 Success</p>
  
  <p>Request:</p>
  
  <pre><code>OPTIONS /revenues/674sf6 HTTP/1.1
  Host: api2.revparmax.local
  Connection: keep-alive
  Access-Control-Request-Method: DELETE
  Origin: http://localhost:3000
  User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) ....
  Access-Control-Request-Headers: token, accept, origin, x-requested-with, content-type
  Accept: */*
  Referer: http://localhost:3000/app/daily/
  Accept-Encoding: gzip,deflate,sdch
  Accept-Language: en-US,en;q=0.8
  </code></pre>
  
  <p>Response:</p>
  
  <pre><code>HTTP/1.1 200 OK
  Date: Mon, 27 May 2013 20:01:32 GMT
  Server: Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1...
  X-Powered-By: PHP/5.3.1
  Access-Control-Allow-Origin: http://localhost:3000
  Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
  Access-Control-Allow-Headers: origin, x-requested-with, content-type, accept, TOKEN
  Access-Control-Max-Age: 86400
  Content-Length: 2
  Keep-Alive: timeout=5, max=100
  Connection: Keep-Alive
  Content-Type: application/json; charset=utf-8
  </code></pre>
  
  <h2>DELETE header</h2>
  
  <p>But then my delete request fails...</p>
  
  <p>Request:</p>
  
  <pre><code>DELETE http://api2.revparmax.local/revenues/674sf6 HTTP/1.1
  TOKEN: 00899766786875875674557454
  Accept: application/json, text/javascript, */*; q=0.01
  Referer: http://localhost:3000/app/daily/
  Origin: http://localhost:3000
  X-Requested-With: XMLHttpRequest
  User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) ....
  Content-Type: application/x-www-form-urlencoded; charset=UTF-8
  </code></pre>
  
  <h2>Error</h2>
  
  <pre><code>XMLHttpRequest cannot load http://api2.revparmax.local/revenues/674sf6. Origin http://localhost:3000 is not allowed by Access-Control-Allow-Origin.
  </code></pre>
  
  <h2>Note</h2>
  
  <p>Oh - I should mention the model still gets deleted from the server but my problem is the Ajax deferred within my backbone app is all thrown off then because of this error.</p>
  
  <p>Also, my request payload when it fails is [object Object] - could that be causing the problem?</p>