Skip to content
Myr

uh, sure

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 be04142 · Browse files · 1 file+15 added−14 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−14 removed

  • other:+15 added−14 removed

1 file+15 added−14 removed

modified:requests/models.py+15 added-14 removed
479 unmodified lines
480 # Nottin' on you.481 body = None482 content_type = None483484 # Use .netrc auth if none was provided.485 if not self.auth and self.config.get('trust_env'):486 self.auth = get_netrc_auth(url)487488 if self.auth:489 if isinstance(self.auth, tuple) and len(self.auth) == 2:490 # special-case basic HTTP auth491 self.auth = HTTPBasicAuth(*self.auth)492493 # Allow auth to make its changes.494 r = self.auth(self)495496 # Update self to reflect the auth changes.497 self.__dict__.update(r.__dict__)498499 # Multi-part file uploads.500 if self.files:501 (body, content_type) = self._enc_files502 else:
8 unmodified lines
511 # Add content-type if it wasn't explicitly provided.512 if (content_type) and (not 'content-type' in self.headers):513 self.headers['Content-Type'] = content_type514500 # Use .netrc auth if none was provided.501 if not self.auth and self.config.get('trust_env'):502 self.auth = get_netrc_auth(url)515504 if self.auth:505 if isinstance(self.auth, tuple) and len(self.auth) == 2:506 # special-case basic HTTP auth507 self.auth = HTTPBasicAuth(*self.auth)508509 # Allow auth to make its changes.510 r = self.auth(self)511512 # Update self to reflect the auth changes.513 self.__dict__.update(r.__dict__)514516 _p = urlparse(url)517 proxy = self.proxies.get(_p.scheme)518519 if proxy:
333 unmodified lines