Rails 2.1 restful_authentication with Internet Explorer
restful_authentication plugin is very helpful,
and probably the most common, when developing an authentication system on Rails. I have used it with Rails 1 and 2.0.2 with no problems.
But with Rails 2.1, I got some strange behavior.
After the default installation, when you try to access any protected action, you should be redirected to the login page. This works fine with Firefox.
But with IE, I get the http basic authentication window instead!
After asking Google, I couldn't find a solution but discovered that, for some reason, IE doesn't seem to send the right accept headers.
So, temporarily, I have disabled the http basic authentication by commenting the last 3 lines of the access_denied method.
Does anyone know a solution for this problem?
Did you like this article? Bookmark it:
Related Articles
- Installing Mephisto 0.8.2 on Rails 2.2.2
- Upgrading InstantRails to Rails 2.2 on Windows
- Running Aptana/Eclipse and InstantRails from a USB Drive
- Thinking Sphinx in Arabic/Unicode
- Thinking Sphinx on Windows








Frank
September 17th, 2008 - 11:44 PM
+1 to that Really strange
Dan
December 5th, 2008 - 01:24 PM
I just found this hack suggested by Joshua Doss at http://www.nabble.com/Restful_authentication,-Internet-Explorer,-and-unwanted-http-basic--dialog-td18147300.html request.format ||= :html if request.env['HTTP_USER_AGENT'] =~ /msie/i I haven't tried it yet, though...