开发者

Different range request response in Firefox and Chrome

I am currently testing some JavaScript that makes a GET request (ie. XMLHttpRequest with "get") with a Range header. Because the request is cross-domain, I'm implementing access control headers in the response as described here:

https://developer.mozilla.org/En/HTTP_access_control#Preflighted_requests

What's confusing me however is that my current server setup is working in Chrome but not in Firefox. Specifically, when 开发者_开发知识库I run the JavaScript in Chrome I'm getting back a chunk of the requested data, just like I want. In Firefox however I'm getting error code 501 on request method OPTIONS

At first that seems like the OPTIONS request method needs to be handled by the server, but that works in Chrome so it looks like this is a red herring and something else is wrong. Currently the following response headers are implemented, perhaps this is where the problem lies:

Access-Control-Allow-Headers: Range
Access-Control-Allow-Origin: *

Anyone have any insight in what I need to do? Do Chrome and Firefox handle cross-domain restrictions differently?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜