Request digest-auth eats 4xx and 5xx response codes

Presently, if you use the HTTPDigestAuth auth handler and authenticate successfully, but the resource you are requesting results in a 4xx or a 5xx error, the response object returned is always a 401.

I've tested this with a modified version of your httpbin web application (thanks for that) which allows me to set the desired status code on a successful digest authentication. 

Testing this with every status code from 101 -> 599 yields the following (i skipped instances where redirects occurred correctly):
expected 400, got 401 - this is unexpected
expected 401, got 401 - while this status code is expected, it's the wrong 401. I captured the traffic on the wire and the headers sent in the 401 response do not match that which are present on the response object I get from requests.
expected 402-499, got 401 - this is unexpected
expected 500-599, got 401 - this is unexpected


FYI I noticed this when working on generating an HTTPKerberosAuth handler for requests. My code has the same problem and I'm not sure where the problem is coming from, within the handlers, or elsewhere.


I think this has to do with the dispatch_hook code. In hooks.py, you have the line:

```
hook_data = hook(hook_data) or hook_data
```

Since 400 and 500 level responses evaluate to False in a boolean context, we throw out the response returned by a hook if it's a 400 or 500 level response, and use the initial response that got passed into the dispatch_hook call. I'm not certain why you have that line, so I'm not 100% certain it's safe to change, but I suspect you want to test for None instead of truthiness.


I have a fix for this, but it breaks some tests:

test_DIGESTAUTH_WRONG_HTTP_401_GET complains because we are testing for 401's even though httpbin was actually returning a 403. I'll include an updated test for that.

I don't see anything else that is broken by this change, but it's hard to tell because I can't run the full test suite even before I make this change. I get lots of errors (not failures) -- this is likely due to me using python 2.6 (work, ugh).


FYI, the errors I get when running the tests are all of the form:

```
TypeError: unicode() argument 2 must be string, not None¶
```

and

```
AttributeError: 'RequestsTestSuite' object has no attribute 'assertIn'
```

The assertIn exception is because in python 2.6 assertIn isn't part of unittest, though it's available in unittest2. I'm going to include a commit in my pull request that opts to use unittest2 if it's available.


Actually correction on my update about test_DIGESTAUTH_WRONG_HTTP_401_GET. The test is correctly testing for 401, but the bug is actually with httpbin. It's returning a 403 on failed authentication. It should be returning a 401:

```
10.4.2 401 Unauthorized

The request requires user authentication. The response MUST include a WWW-Authenticate header field (section 14.47) containing a challenge applicable to the requested resource. The client MAY repeat the request with a suitable Authorization header field (section 14.8). If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials. If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user SHOULD be presented the entity that was given in the response, since that entity might include relevant diagnostic information. HTTP access authentication is explained in "HTTP Authentication: Basic and Digest Access Authentication" [43].
```

vs

```
10.4.4 403 Forbidden

The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. If the server does not wish to make this information available to the client, the status code 404 (Not Found) can be used instead.
```


http://travis-ci.org/#!/kennethreitz/requests/builds/1533375 :)