Note that there are some explanatory texts on larger screens.

plurals
  1. POBackbone + jQuery + Tornado: OPTIONS request "Load canceled"
    primarykey
    data
    text
    <p>I am using Backbone and jQuery on the front and have an API using Python/Tornado. Because my API is at <a href="http://api.domain.com" rel="nofollow">http://api.domain.com</a> and the site is at <a href="http://domain.com" rel="nofollow">http://domain.com</a> when I try to save a Backbone model it does an OPTIONS request first. The problem is it says "Load canceled" even though the server returned a valid response.</p> <p>Request Headers:</p> <pre><code>OPTIONS /user/xdfr456890sd HTTP/1.1 Host: api.domain.com Connection: keep-alive Access-Control-Request-Method: PUT Origin: http://domain.com User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_1) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4 Access-Control-Request-Headers: origin, content-type, accept Accept: */* Referer: http://domain.com/settings Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 </code></pre> <p>Response Headers:</p> <pre><code>HTTP/1.1 200 OK Date: Thu, 06 Dec 2012 05:41:51 GMT Content-Type: text/plain Content-Length: 0 Connection: keep-alive Server: TornadoServer/2.4 Access-Control-Allow-Credentials: true Access-Control-Allow-Origin: http://domain.com Access-Control-Allow-Methods: PUT, DELETE, POST, GET Access-Control-Allow-Headers: Origin, Accept-Language, Accept-Encoding, Accept-Charset, Access-Control-Request-Headers, X-Scheme, Connection, Accept, User-Agent, Access-Control-Request-Method, Host, Referer, X-Real-Ip </code></pre> <p>Am I missing something? Doing something wrong? I have experimented with every possible combination of response headers and their values. <code>Access-Control-Allow-Origin</code> is whatever the <code>Origin</code> request header is.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload