title: jQuery PUT ajax request not working
body: <p>I'm trying to save a Backbone model in couchdb so I've overridden the <code>save</code> method with a ajax requet to couchdb:</p>
  
  <pre><code>  $.ajax({
      type: 'PUT',
      url: 'http://127.0.0.1:5984/movies/' + this.get('id'),
      contentType: 'application/json',
      data: JSON.stringify(this.toJSON()),
      success: function() {
        console.log('asdf');
      },
      failure: function() {
       console.log('test');
      }
    });
  </code></pre>
  
  <p>The request is sent but when I look at the couchdb log jQuery seems to send a <code>OPTIONS</code> HTTP method instead of <code>PUT</code>:</p>
  
  <blockquote>
    <p>[info] [&lt;0.1601.0>] 127.0.0.1 - -
    'OPTIONS' /movies/862 405</p>
  </blockquote>
  
  <p>and couchdb sends a <code>405</code> HTTP Response code (method not allowed). Any Ideas?</p>
  
  <p><strong>Edit</strong>
  Here are the headers sent to CouchDB:</p>
  
  <pre><code>OPTIONS /movies/862 HTTP/1.1
  Host: 127.0.0.1:5984
  Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  Accept-Language: en-us,en;q=0.5
  Accept-Encoding: gzip, deflate
  Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
  Keep-Alive: 115
  Connection: keep-alive
  Origin: http://localhost:8888
  Access-Control-Request-Method: PUT
  Access-Control-Request-Headers: content-type
  </code></pre>