Skip to content
Myr

python2.5 cookie support

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 0a4b735 · Browse files · 1 file+6 added−5 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+6 added−5 removed

  • other:+6 added−5 removed

1 file+6 added−5 removed

modified:requests/models.py+6 added-5 removed
3 unmodified lines
4"""5requests.models6~~~~~~~~~~~~~~~78This module contains the primary objects that power Requests.9"""1011import urllib12import zlib12from Cookie import SimpleCookie1314from Cookie import SimpleCookie15from urlparse import urlparse, urlunparse, urljoin16from datetime import datetime1718from .auth import dispatch as auth_dispatch
7 unmodified lines
26from .packages.urllib3.filepost import encode_multipart_formdata27from .exceptions import (28 Timeout, URLRequired, TooManyRedirects, HTTPError, ConnectionError)29from .utils import (29 dict_from_cookiejar, get_unicode_from_response,30 stream_decode_response_unicode, decode_gzip, stream_decode_gzip)30 get_unicode_from_response, stream_decode_response_unicode,31 decode_gzip, stream_decode_gzip)32333435
357 unmodified lines
393 # Skip if 'cookie' header is explicitly set.394 if 'cookie' not in self.headers:395396 # Simple cookie with our dict.396 # TODO: Multi-value headers.397 c = SimpleCookie()398 c.load(self.cookies)398 for (k, v) in self.cookies.items():399 c[k] = v400401 # Turn it into a header.402 cookie_header = c.output(header='').strip()403
190 unmodified lines