Skip to content
Myr

Merge pull request #1535 from sigmavirus24/ignore_original_response_if_none

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

Skip cookie extraction if necessary

authored by Kenneth Reitz · committed by Kenneth Reitz · parents abfb38b, 98680b6 · Browse files · 1 file+3 added−0 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−0 removed

  • other:+3 added−0 removed

1 file+3 added−0 removed

modified:requests/cookies.py+3 added
105 unmodified lines
106 :param jar: cookielib.CookieJar (not necessarily a RequestsCookieJar)107 :param request: our own requests.Request object108 :param response: urllib3.HTTPResponse object109 """110 if not (hasattr(response, '_original_response') and111 response._original_response):112 return113 # the _original_response field is the wrapped httplib.HTTPResponse object,114 req = MockRequest(request)115 # pull out the HTTPMessage with the headers and put it in the mock:116 res = MockResponse(response._original_response.msg)
290 unmodified lines