Skip to content
Myr

cookies are oreos

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

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 4385406 · Browse files · 1 file+2 added−8 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+2 added−8 removed

  • other:+2 added−8 removed

1 file+2 added−8 removed

modified:requests/models.py+2 added-8 removed
16 unmodified lines
17from .auth import dispatch as auth_dispatch18from .hooks import dispatch_hook19from .structures import CaseInsensitiveDict20from .status_codes import codes21from .packages import oreos22from .packages.urllib3.exceptions import MaxRetryError23from .packages.urllib3.exceptions import SSLError as _SSLError24from .packages.urllib3.exceptions import HTTPError as _HTTPError25from .packages.urllib3 import connectionpool, poolmanager
117 unmodified lines
143 """Build internal :class:`Response <Response>` object144 from given response.145 """146146147 def build(resp):148149 response = Response()150
13 unmodified lines
164165 # Add new cookies from the server.166 if 'set-cookie' in response.headers:167 cookie_header = response.headers['set-cookie']168 cookies = oreos.dict_from_string(cookie_header)169169 c = SimpleCookie()170 c.load(cookie_header)171172 for k,v in c.items():173 cookies.update({k: v.value})174170 # Save cookies in Response.171 response.cookies = cookies172173 # Save original resopnse for later.
5 unmodified lines
179 response.url = self.full_url180181 return response182188183 history = []184185 r = build(resp)186 cookies = self.cookies
432 unmodified lines