kennethreitz/requests — pull request #2305 by ssadler (2014-10-25 11:57:53+00:00)
Title: Fix 1979 digest redirects

Ran into #1979. I think it's reasonable to try the digest request again every time we encounter a 3xx. Also changed the state variable `num_401_calls` to a boolean `do_401`, since it's just used to see if we should try again and decrementing it on 3xx would be misleading. I assumed it would be safe to rename it since it looks like it's supposed to be hidden (not declared in constructor). I also assume that existing max redirects handler will still work. Regression test also still due.