Skip to content
Myr

Now requotes the entire URL, not just the path (Issue #429).

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

authored by Matt Giuca · committed by Matt Giuca · parent 3ae0ff3 · Browse files · 1 file+16 added−6 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+16 added−6 removed

  • other:+16 added−6 removed

1 file+16 added−6 removed

modified:requests/models.py+16 added-6 removed
319 unmodified lines
320 if not path:321 path = '/'322323 if is_py2:324 if isinstance(scheme, str):325 scheme = scheme.encode('utf-8')326 if isinstance(netloc, str):327 netloc = netloc.encode('utf-8')328 if isinstance(path, str):329 path = path.encode('utf-8')330 if isinstance(params, str):331 params = params.encode('utf-8')332 if isinstance(query, str):333 query = query.encode('utf-8')334 if isinstance(fragment, str):335 fragment = fragment.encode('utf-8')336327 path = requote_path(path)328337 url = (urlunparse([ scheme, netloc, path, params, query, fragment ]))338339 if self._enc_params:340 if urlparse(url).query:333 return '%s&%s' % (url, self._enc_params)341 url = '%s&%s' % (url, self._enc_params)342 else:335 return '%s?%s' % (url, self._enc_params)336 else:337 return url343 url = '%s?%s' % (url, self._enc_params)344345 url = requote_path(url)346347 return url348349 @property350 def path_url(self):351 """Build the path URL to use."""352
451 unmodified lines