Skip to content
Myr

Merge pull request #1185 from sigmavirus24/fix_hook_dispatching

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Dispatch hooks before following redirects

authored by Kenneth Reitz · committed by Kenneth Reitz · parents cdec20a, 4dfd6f3 · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:requests/sessions.py+3 added-3 removed
412 unmodified lines
413 r = adapter.send(request, **kwargs)414 # Total elapsed time of the request (approximately)415 r.elapsed = datetime.utcnow() - start416417 # Response manipulation hooks418 r = dispatch_hook('response', hooks, r)419420 # Redirect resolving generator.421 gen = self.resolve_redirects(r, request, stream=stream,422 timeout=timeout, verify=verify, cert=cert,423 proxies=proxies)
8 unmodified lines
432 # Get the last request made433 r = history.pop()434 r.history = tuple(history)435433 # Response manipulation hooks434 r = dispatch_hook('response', hooks, r)435436 return r437438 def get_adapter(self, url):439 """Returns the appropriate connnection adapter for the given URL."""
29 unmodified lines