i'm now trying to read an odata service with using CORS. To support this the server has to respond with specific headers like:
'Access-Control-Expose-Headers: Content-Type, Content-Length
Now datajs calls the readResponseHeaders(xhr, headers); method and in there xhr.getAllResponseHeaders().
Now this returns null when using firefox 3.5 and Firefox 5 returns an empty string although I exposed some headers as seen above.
So I could not get the response type (if it was xml or JSON) and so on the datajs handler can't handle and process the response correctly...
for example worked.
So in the end I would say that this is a firefox bug where firefox doesn't return the requested CORS headers.
You can try it yourself by using this samply by John Resig...
Did you guys also tried datajs with CORS and ran into similar problems? If yes is there a way that datajs can handle this?
Otherwise we have to wait for fixes in firefox. Also I don't know about if and how other browsers already support CORS.
PS: Also interesting to read: