Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Making basic auth work with webrat and mechanize #64

wants to merge 4 commits into


None yet
2 participants

knifhen commented Sep 16, 2011


I have made some changes to webrat to make the basic_auth method work with the mechanize adapter.
I have also added the possibility to configure follow redirects for mechanize.

It would be awesome if you want to merge my changes and make it public.

//Best regard Andreas Knifh

tobyw4n commented Dec 13, 2011

Hey Andreas, I made these changes to webrat 0.7.2 and it works for basic_auth with mechanize 1.0.0, but the ability to follow redirects seems to be broken. Please let me know if I can assist with troubleshooting. I'm sort of new to all of this.

knifhen commented Dec 16, 2011

In my env.rb I have added the following. So if you can add the corresponding config with follow_redirects = true it should work

Webrat.configure do |config|
config.mode = :mechanize
config.follow_redirects = true

tobyw4n commented Dec 16, 2011

That worked great. Thanks a bunch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment