A fix for #1979: repeat HTTP digest authentication after redirect.

This solves the following scenario:
(1) 401 (Digest authentication begins)
(2) 302 (Authenticated, response redirects to another endpoint)
(3) 401 (New endpoint also requires authentication)

why not just use `if r.is_redirect()`?