Skip to content
Myr

data encoding must be done after calling an auth provider which might change the data (as auth.OAuth1 does)

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

authored by Andre Graf · committed by Andre Graf · parent 0ad4456 · Browse files · 1 file+15 added−15 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+15 added−15 removed

  • other:+15 added−15 removed

1 file+15 added−15 removed

modified:requests/models.py+15 added-15 removed
497 unmodified lines
498 self.config.get('verbose').write('%s %s %s\n' % (499 datetime.now().isoformat(), self.method, url500 ))501502 # Use .netrc auth if none was provided.503 if not self.auth and self.config.get('trust_env'):504 self.auth = get_netrc_auth(url)505506 if self.auth:507 if isinstance(self.auth, tuple) and len(self.auth) == 2:508 # special-case basic HTTP auth509 self.auth = HTTPBasicAuth(*self.auth)510511 # Allow auth to make its changes.512 r = self.auth(self)513514 # Update self to reflect the auth changes.515 self.__dict__.update(r.__dict__)516517 # Nottin' on you.518 body = None519 content_type = None520
12 unmodified lines
533 # Add content-type if it wasn't explicitly provided.534 if (content_type) and (not 'content-type' in self.headers):535 self.headers['Content-Type'] = content_type536522 # Use .netrc auth if none was provided.523 if not self.auth and self.config.get('trust_env'):524 self.auth = get_netrc_auth(url)525526 if self.auth:527 if isinstance(self.auth, tuple) and len(self.auth) == 2:528 # special-case basic HTTP auth529 self.auth = HTTPBasicAuth(*self.auth)530531 # Allow auth to make its changes.532 r = self.auth(self)533534 # Update self to reflect the auth changes.535 self.__dict__.update(r.__dict__)536537 _p = urlparse(url)538 no_proxy = filter(lambda x: x.strip(), self.proxies.get('no', '').split(','))539 proxy = self.proxies.get(_p.scheme)540
345 unmodified lines