Re: [cors] when a preflight goes bad

2011-12-06 Thread Karl Dubost

Le 5 déc. 2011 à 10:42, Benson Margulies a écrit :
 For that matter, it occurs to me, even if the entire preflight is a
 success, the status code will still be not found, won't it, if there
 is no other OPTIONS handler for the resource?

What do you mean?
if you send to the server something like 

OPTIONS /foo HTTP/1.1
Host: www.example.com

* If there is a resource defined like in this case
  http://www.example.com/foo;
  then the server should return a 200 OK. [1]
* If the server doesn't support the OPTIONS method, 
  then it should return a 405 Method Not Allowed [2]

But I might miss entirely your point.

[1]: http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-17#section-6.2
[2]: http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-17#section-7.4.6

-- 
Karl Dubost - http://dev.opera.com/
Developer Relations  Tools, Opera Software




[cors] when a preflight goes bad

2011-12-05 Thread Benson Margulies
The spec for resource sharing never discusses a status code for a
failed. It just says, 'terminate'.

To me, this suggests that, if there is no other OPTIONS processing
going on, the net result will be a NOT FOUND.

For that matter, it occurs to me, even if the entire preflight is a
success, the status code will still be not found, won't it, if there
is no other OPTIONS handler for the resource?

Am I misinterpreting?



Re: [cors] when a preflight goes bad

2011-12-05 Thread Anne van Kesteren
On Mon, 05 Dec 2011 16:42:54 +0100, Benson Margulies  
bimargul...@gmail.com wrote:

The spec for resource sharing never discusses a status code for a
failed. It just says, 'terminate'.

To me, this suggests that, if there is no other OPTIONS processing
going on, the net result will be a NOT FOUND.

For that matter, it occurs to me, even if the entire preflight is a
success, the status code will still be not found, won't it, if there
is no other OPTIONS handler for the resource?

Am I misinterpreting?


There is no status code.  
http://dvcs.w3.org/hg/cors/raw-file/tip/Overview.html#cross-origin-request-status  
is set to network error which is on the granularity of failed to  
connect, unknown domain, etc.



--
Anne van Kesteren
http://annevankesteren.nl/



Re: [cors] when a preflight goes bad

2011-12-05 Thread Benson Margulies
 The spec for resource sharing never discusses a status code for a
 failed. It just says, 'terminate'.

 To me, this suggests that, if there is no other OPTIONS processing
 going on, the net result will be a NOT FOUND.

 For that matter, it occurs to me, even if the entire preflight is a
 success, the status code will still be not found, won't it, if there
 is no other OPTIONS handler for the resource?

 Am I misinterpreting?


 There is no status code.
 http://dvcs.w3.org/hg/cors/raw-file/tip/Overview.html#cross-origin-request-status
 is set to network error which is on the granularity of failed to connect,
 unknown domain, etc.

That's on the client side, isn't it?. I'm worried about the resource
side. On the resource side, what HTTP status code should be coming
back from server to client for a preflight when the server has no
other OPTIONS to return. 200? or 40x?





 --
 Anne van Kesteren
 http://annevankesteren.nl/



Re: [cors] when a preflight goes bad

2011-12-05 Thread Anne van Kesteren
On Mon, 05 Dec 2011 16:57:17 +0100, Benson Margulies  
bimargul...@gmail.com wrote:

That's on the client side, isn't it?. I'm worried about the resource
side. On the resource side, what HTTP status code should be coming
back from server to client for a preflight when the server has no
other OPTIONS to return. 200? or 40x?


Oh sorry, that does not matter. Whatever else you do in response to the  
OPTIONS request besides setting CORS-related headers on a 200 response is  
not observable. You could have a 200 response with CORS-related headers  
that make it fail, you could have a 201 response with CORS-related headers  
that make it pass, but will fail for it not being 200; you could have a  
200 with no CORS headers. Whatever suits you.



--
Anne van Kesteren
http://annevankesteren.nl/