kennethreitz/requests — pull request #2210 by sigmavirus24 (2014-09-07 17:03:09+00:00)
Title: Fix #2207

@Lukasa wrote the fix in #2207

With this, the expected behaviour is restored (a `TooManyRedirects` error);

```pycon
>>> import requests
r>>> r = requests.get('http://www.dx.com/p/-268479')
Traceback (most recent call last):
File "", line 1, in
File "./requests/api.py", line 59, in get
return request('get', url, **kwargs)
File "./requests/api.py", line 48, in request
return session.request(method=method, url=url, **kwargs)
File "./requests/sessions.py", line 451, in request
resp = self.send(prep, **send_kwargs)
File "./requests/sessions.py", line 583, in send
history = [resp for resp in gen] if allow_redirects else []
File "./requests/sessions.py", line 583, in
history = [resp for resp in gen] if allow_redirects else []
File "./requests/sessions.py", line 111, in resolve_redirects
raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects)
requests.exceptions.TooManyRedirects: Exceeded 30 redirects.
```