Bug: HTTP/1.1 406 Not Acceptable
xpepermint opened this issue · 5 comments
When POSTing data I get HTTP/1.1 406 Not Acceptable response insted of created. If I delete has_mobile_fu from my controller things are working again.
Are you using other plugin that handles mime types? I'm using community engine here and I'm having the same issue.
The problem is probably due to you having respond_to do |format| .... end with no format.mobile or format.html in there. As your controller does not know how to deal with the format that has been specified, it simply returns 406 not acceptable. The other option is that you lack a view for the format that was requested.
If you're using jQuery Mobile along with the jquery-rails gem, jQuery Mobile makes its own Ajax request in which it only accepts html type. The jquery-rails way handles returned JavaScript, too. Your app is probably returning a format that the requester doesn't want.
I have the same problem, I am using jquery-mobile and rails 3.1.3
This project is abandoned. Please see the active fork at http://github.com/benlangfeld/mobile-fu. Please test with the released gem and master branch of the new home for the project, and file an issue on the other repo if you still have problems.
See #40.