Skip to content
Myr

Renamed get_clean_url -> cleanup_url.

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

authored by Jérémy Bethmont · committed by Jérémy Bethmont · parent 7077272 · Browse files · 2 files+3 added−3 removed
This commit

State

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

Diff stats

2 files+3 added−3 removed

  • other:+3 added−3 removed

2 files+3 added−3 removed

modified:requests/models.py+1 added-1 removed
197 unmodified lines
198199 # Add the old request to the history collector.200 history.append(r)201202 url = get_clean_url(r.headers['location'], parent_url=self.url)202 url = cleanup_url(r.headers['location'], parent_url=self.url)203204 # If 303, convert to idempotent GET.205 # http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4206 if r.status_code is codes.see_other:
284 unmodified lines
modified:requests/utils.py+2 added-2 removed
42 unmodified lines
4344 else:45 return params4647def get_clean_url(url, parent_url=None):47def cleanup_url(url, parent_url=None):48 # Handle redirection without scheme (see: RFC 1808 Section 4)49 if url.startswith('//'):50 parsed_rurl = urlparse(parent_url)51 url = '%s:%s' % (parsed_rurl.scheme, url)
20 unmodified lines
7273def build_url(url, query_params):74 """Build the actual URL to use."""7576 url = get_clean_url(url)76 url = cleanup_url(url)7778 query_params = encode_params(query_params)7980 if query_params:
315 unmodified lines