Skip to content
Myr

Merge pull request #1254 from jkakar/url-authentication

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

url-authentication

authored by Kenneth Reitz · committed by Kenneth Reitz · parents cb2116d, 7d217bf · Browse files · 1 file+5 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

1 file+5 added−1 removed

  • other:+5 added−1 removed

1 file+5 added−1 removed

modified:requests/models.py+5 added-1 removed
18 unmodified lines
19from .cookies import cookiejar_from_dict, get_cookie_header20from .packages.urllib3.filepost import encode_multipart_formdata21from .exceptions import HTTPError, RequestException, MissingSchema, InvalidURL22from .utils import (23 stream_untransfer, guess_filename, requote_uri,23 stream_untransfer, guess_filename, get_auth_from_url, requote_uri,24 stream_decode_response_unicode, to_key_val_list, parse_header_links,25 iter_slices, guess_json_utf, super_len)26from .compat import (27 cookielib, urlparse, urlunparse, urlsplit, urlencode, str, bytes, StringIO,
193 unmodified lines
221 p.prepare_cookies(self.cookies)222 p.prepare_body(self.data, self.files)223 # Note that prepare_auth must be last to enable authentication schemes224 # such as OAuth to work on a fully prepared request.225 if self.auth is None:226 auth = get_auth_from_url(self.url)227 if auth[0] is not None and auth[1] is not None:228 self.auth = auth229 p.prepare_auth(self.auth)230 # This MUST go after prepare_auth. Authenticators could add a hook231 p.prepare_hooks(self.hooks)232
435 unmodified lines