Hi Patrick,

Thank you so much for taking the time to look into the plugin's code and 
offering advice.

I gave it a shot and it appears my rescue_from is being ignored:

This is what i have in application.rb (just for testing)

  ##application.rb
  rescue_from Htpasswd::NotAuthorizedError, :with => :badlogin
  def badlogin
    redirect_to "http://www.google.com";
  end

when the pw box comes up, i put in bad login info... and it just loops 
infinitely prompting me with the login/pw fields.


In my server log i have this over and over:

Processing PostsController#index (for 127.0.0.1 at 2008-10-18 15:54:41) 
[GET]
  Session ID: 
BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo
SGFzaHsABjoKQHVzZWR7AA==--b13da02c3dcb245cb43911897a5d940881991d88
  Parameters: {"action"=>"index", "controller"=>"posts"}
Htpasswd is enabled with {:schemes=>#<Set: {:basic}>}
Htpasswd accepts authorization header: 'Basic YXdlZmF3ZWY6'
Htpasswd error(Htpasswd::UnknownUserAccount): 
Htpasswd::UnknownUserAccount
Htpasswd sending authenticate header: 'Basic realm="Authorization"'
Filter chain halted as [:htpasswd_authorize] rendered_or_redirected.
Completed in 0.00386 (259 reqs/sec) | Rendering: 0.00101 (26%) | DB: 
0.00000 (0%) | 401 Unauthorized [http://localhost/posts]


Looking at the bottom of 
http://wota.jp/svn/rails/plugins/branches/stable/htpasswd/lib/htpasswd/class_methods.rb
 
it appears the plugin is rescuing it's own error?

Do you think it is stepping in before my "rescue_from"?  If so, is it 
possible to work around that some how?


thx again.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to