Skip to content
Myr

Merge pull request #1117 from sigmavirus24/issue1106

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

Fix #1106

authored by Kenneth Reitz · committed by Kenneth Reitz · parents 472a5b4, 27e814a · Browse files · 2 files+5 added−4 removed
This commit

State

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

Diff stats

2 files+5 added−4 removed

  • other:+5 added−4 removed

2 files+5 added−4 removed

modified:requests/adapters.py-3 removed
11 unmodified lines
1213from .models import Response14from .packages.urllib3.poolmanager import PoolManager, ProxyManager15from .packages.urllib3.response import HTTPResponse16from .hooks import dispatch_hook16from .compat import urlparse, basestring, urldefrag17from .utils import (DEFAULT_CA_BUNDLE_PATH, get_encoding_from_headers,18 prepend_scheme_if_needed)19from .structures import CaseInsensitiveDict
87 unmodified lines
107 # Give the Response some context.108 response.request = req109 response.connection = self110112 # Run the Response hook.113 response = dispatch_hook('response', req.hooks, response)111 return response112113 def get_connection(self, url, proxies=None):114 """Returns a connection for the given URL."""
107 unmodified lines
modified:requests/sessions.py+5 added-1 removed
273 unmodified lines
274275 # Prepare the Request.276 prep = req.prepare()277278 # If auth hooks are present, they aren't passed to `dispatch_hook`279 # As such, we need to update the original hooks dictionary with them280 hooks.update(prep.hooks)281282 # Send the request.283 resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)284285 # Persist cookies.
12 unmodified lines
298 resp = history.pop()299 resp.history = tuple(history)300301 # Response manipulation hook.298 self.response = dispatch_hook('response', hooks, resp)302 resp = dispatch_hook('response', hooks, resp)303304 return resp305306 def get(self, url, **kwargs):
105 unmodified lines