I'm having a problem with getting the datajs working with OData supporting CORS.
So when I'm sending a simple GET request to a server from FireFox this is how the raw request looks like:
OPTIONS http://xxx/dps/AnnotationTypes HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0
Accept-Encoding: gzip, deflate
And the response from the server:
HTTP/1.1 501 Not Implemented
Access-Control-Allow-Headers: Content-Type, Accept, Origin, X-Requested-With, MaxDataServiceVersion, DataServiceVersion, dptoken, role , platform
Access-Control-Allow-Methods: PUT, POST, GET, DELETE, MERGE, OPTIONS
Date: Wed, 09 Jan 2013 17:10:55 GMT
Chrome and IE also get the 501 response but they ignore it and next receive a proper response, so effectively communication with OData works fine in these browsers while FireFox gets stopped.
I was wondering if anyone who successfully implemented the OData service with CORS had similar issues. Is there anything obvious in the headers that I pasted here that would indicate a problem? It seems that the server doesn't like the OPTIONS request send
by a browser and this is probably a reason for the Not Implemented message.