Skip to content
Myr

cleanup to url logic

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 4e5c4a6 · Browse files · 1 file+2 added−7 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+2 added−7 removed

  • other:+2 added−7 removed

1 file+2 added−7 removed

modified:requests/models.py+2 added-7 removed
238 unmodified lines
239 netloc = netloc.encode('idna').decode('utf-8')240 except UnicodeError:241 raise InvalidURL('URL has an invalid label.')242243 # Bare domains aren't valid URLs.244 if not path:245 path = '/'246247 if is_py2:
16 unmodified lines
264 query = '%s&%s' % (query, enc_params)265 else:266 query = enc_params267267 url = (urlunparse([scheme, netloc, path, params, query, fragment]))268269 # if self.config.get('encode_uri', True):270 # url = requote_uri(url)271 # TODO: re-evaluate quote param (perhaps not, people can create this themselves now)272 url = requote_uri(url)273268 url = requote_uri(urlunparse([scheme, netloc, path, params, query, fragment]))269 self.url = url270271 def prepare_headers(self, headers):272 """Prepares the given HTTP headers."""
302 unmodified lines