Skip to content
Myr

Merge pull request #1724 from daftshady/dev3

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

Fixed #1723

authored by Kenneth Reitz · committed by Kenneth Reitz · parents 598f977, 1511dfa · Browse files · 2 files+9 added−1 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+9 added−1 removed

  • other:+9 added−1 removed

2 files+9 added−1 removed

modified:requests/sessions.py+4 added-1 removed
10 unmodified lines
11import os12from collections import Mapping13from datetime import datetime1415from .compat import cookielib, OrderedDict, urljoin, urlparse, urlunparse15from .compat import cookielib, OrderedDict, urljoin, urlparse, urlunparse, builtin_str16from .cookies import cookiejar_from_dict, extract_cookies_to_jar, RequestsCookieJar17from .models import Request, PreparedRequest18from .hooks import default_hooks, dispatch_hook19from .utils import to_key_val_list, default_headers
288 unmodified lines
308 A CA_BUNDLE path can also be provided.309 :param cert: (optional) if String, path to ssl client cert file (.pem).310 If Tuple, ('cert', 'key') pair.311 """312313 method = builtin_str(method)314315 # Create the Request.316 req = Request(317 method = method.upper(),318 url = url,
216 unmodified lines
modified:test_requests.py+5 added
431 unmodified lines
432 open(filename, 'rb'))})433 prep = r.prepare()434 assert b'name="stuff"' in prep.body435 assert b'name="b\'stuff\'"' not in prep.body436 437 def test_unicode_method_name(self):438 files = {'file': open('test_requests.py', 'rb')}439 r = requests.request(method=u'POST', url=httpbin('post'), files=files)440 assert r.status_code == 200441442 def test_custom_content_type(self):443 r = requests.post(httpbin('post'),444 data={'stuff': json.dumps({'a': 123})},
446 unmodified lines