Skip to content
Myr

Merge pull request #1184 from piotr-dobrogost/numeric_codes

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

small cleanup of redirect codes

authored by Kenneth Reitz · committed by Kenneth Reitz · parents 5d9fcc7, 4c8d1b9 · Browse files · 2 files+6 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+6 added−3 removed

  • other:+6 added−3 removed

2 files+6 added−3 removed

modified:requests/models.py-2 removed
12 unmodified lines
1314from io import BytesIO15from .hooks import default_hooks16from .structures import CaseInsensitiveDict17from .status_codes import codes1718from .auth import HTTPBasicAuth19from .cookies import cookiejar_from_dict, get_cookie_header20from .packages.urllib3.filepost import encode_multipart_formdata
5 unmodified lines
26from .compat import (27 cookielib, urlparse, urlunparse, urlsplit, urlencode, str, bytes, StringIO,28 is_py2, chardet, json, builtin_str, basestring)2931REDIRECT_STATI = (codes.moved, codes.found, codes.other, codes.temporary_moved)30CONTENT_CHUNK_SIZE = 10 * 102431ITER_CHUNK_SIZE = 5123233log = logging.getLogger(__name__)
633 unmodified lines
modified:requests/sessions.py+6 added-1 removed
22 unmodified lines
2324from .utils import requote_uri, get_environ_proxies, get_netrc_auth2526from .status_codes import codes27REDIRECT_STATI = (codes.moved, codes.found, codes.other, codes.temporary_moved)27REDIRECT_STATI = (28 codes.moved, # 30129 codes.found, # 30230 codes.other, # 30331 codes.temporary_moved, # 30732)33DEFAULT_REDIRECT_LIMIT = 30343536def merge_kwargs(local_kwarg, default_kwarg):
432 unmodified lines