CORS and non 200 status codes?

127 views
Skip to first unread message

Alexander M

unread,
Dec 21, 2011, 6:01:19 AM12/21/11
to eas...@googlegroups.com
Hi all,

I'm using easyXDM to talk via ajax to a REST api. This api will return status codes like 400 (invalid form submission), 403 etc.

Now the standard CORS implementation will return an error message "INVALID STATUS CODE" and not the response object (I currently rely on the alwaysTrustedOrigins variable). Now I have two questions:
- Why is the message INVALID STATUS CODE? A status code like 403 should be fine? Or is there another reason that CORS throws an error on it?
- If accesControl is enabled, the response object will no be passed back. Shouldn't there be a check for alwaysTrustedOrigins + access control at that place?

Depending on the answers I can send a PR to address the 'issues'.

Cheers!

Alexander

Alexander M

unread,
Jan 6, 2012, 2:55:31 AM1/6/12
to eas...@googlegroups.com
Am I wrong about this? :)
Reply all
Reply to author
Forward
0 new messages