node-easymock icon indicating copy to clipboard operation
node-easymock copied to clipboard

OPTIONS request does not redirect to response location or return response

Open ValeryIvanov opened this issue 9 years ago • 0 comments

So I have set up a generic response like so

< @status 302
< @header Location: http://localhost:3000/mock_data/#{id}/user.do

and in mock_data folder I have folder with customer id for example 123 and there is real response user.do with json data.

Now if I make a ajax request with jquery, this setup works fine in Chrome. First GET request 302 is responded with location header and after that second GET request is made and json response is returned.

If I repeat same thing in Firefox, then first request is the same as with Chrome but after that OPTIONS request is made and no response is added on which request is unsuccessful in javascript code since no response was received.

Why does this not work with Firefox? How can I make Firefox behave like Chrome without editing my code? Can this be done with easymock setup?

ValeryIvanov avatar Jun 30 '16 13:06 ValeryIvanov