Skip to content

Fix of Firefox specific bug.#67

Closed
nicholassm wants to merge 1 commit intorails:masterfrom
nicholassm:master
Closed

Fix of Firefox specific bug.#67
nicholassm wants to merge 1 commit intorails:masterfrom
nicholassm:master

Conversation

@nicholassm
Copy link

Rails returns "406 Not Acceptable" when the response type in an ajax call is different from "text/javascript" (e.g. json). This is because the Accept header is overwritten in Firefox when setting "Accept" to "text/javascript" as the existing code does before invoking the ajax request. (This bug does not appear in other browsers because they prepend "/" to the Accept header field.)
I've fixed it by setting the Accept field to "/".

@neerajsingh0101
Copy link

I had introduced that line sometime back. After thinking about it , I decided to remove that line. In this way whatever value browser sets will be sent to server rather than rails.js setting the value.

Thanks for the pull request. And sorry I should have taken that decision earlier.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants