Skip to content
Myr

Merge fixes

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 46f0146 · Browse files · 2 files+1 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

2 files+1 added−15 removed

  • other:+1 added−15 removed

2 files+1 added−15 removed

modified:requests/api.py+1 added-10 removed
110 unmodified lines
111 :param proxies: (optional) Dictionary mapping protocol to the URL of the proxy.112 :param **kwargs: Optional arguments that ``request`` takes.113 """114115 return request('GET', url, **kwargs)115116 kwargs.setdefault('allow_redirects', True)117 return request('GET', url, **kwargs)118 if "allow_redirects" not in kwargs:119 kwargs["allow_redirects"] = True118121 return request('get', url, **kwargs)119123120def head(url, **kwargs):121 """Sends a HEAD request. Returns :class:`Response` object.122123 :param url: URL for the new :class:`Request` object.
12 unmodified lines
136 :param proxies: (optional) Dictionary mapping protocol to the URL of the proxy.137 :param **kwargs: Optional arguments that ``request`` takes.138 """139144 return request('HEAD', url, **kwargs)140 kwargs.setdefault('allow_redirects', True)141 return request('HEAD', url, **kwargs)147 if "allow_redirects" not in kwargs:148 kwargs["allow_redirects"] = True142150 return request('head', url, **kwargs)143152144def post(url, data='', **kwargs):145 """Sends a POST request. Returns :class:`Response` object.146147 :param url: URL for the new :class:`Request` object.
37 unmodified lines
modified:requests/models.py-5 removed
212 unmodified lines
213 if r.status_code in REDIRECT_STATI and not self.redirect:214215 while (216 ('location' in r.headers) and217 ((self.method in ('GET', 'HEAD')) or218 (r.status_code is codes.see_other) or219 (self.allow_redirects))217 ((r.status_code is codes.see_other) or (self.allow_redirects))221 ((r.status_code is codes.see_other) or222 (self.allow_redirects))218 ):219220 r.fo.close()221
458 unmodified lines