Skip to content
Myr

rename resume/resume_incomplete to permanent_redirect according to rfc7238

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

Use temporary_redirect intead of temporary_moved to make the words line up nicely ;-)

authored by Eric L Frederich · committed by Eric L Frederich · parent 07d9b73 · Browse files · 3 files+7 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

3 files+7 added−7 removed

  • other:+7 added−7 removed

3 files+7 added−7 removed

modified:requests/models.py+5 added-5 removed
33 unmodified lines
3435#: The set of HTTP status codes that indicate an automatically36#: processable redirect.37REDIRECT_STATI = (38 codes.moved, # 30139 codes.found, # 30240 codes.other, # 30341 codes.temporary_moved, # 30742 codes.resume, # 30838 codes.moved, # 30139 codes.found, # 30240 codes.other, # 30341 codes.temporary_redirect, # 30742 codes.permanent_redirect, # 30843)44DEFAULT_REDIRECT_LIMIT = 3045CONTENT_CHUNK_SIZE = 10 * 102446ITER_CHUNK_SIZE = 512
762 unmodified lines
modified:requests/sessions.py+1 added-1 removed
144 unmodified lines
145146 prepared_request.method = method147148 # https://github.com/kennethreitz/requests/issues/1084149 if resp.status_code not in (codes.temporary, codes.resume):149 if resp.status_code not in (codes.temporary_redirect, codes.permanent_redirect):150 if 'Content-Length' in prepared_request.headers:151 del prepared_request.headers['Content-Length']152153 prepared_request.body = None
484 unmodified lines
modified:requests/status_codes.py+1 added-1 removed
28 unmodified lines
29 304: ('not_modified',),30 305: ('use_proxy',),31 306: ('switch_proxy',),32 307: ('temporary_redirect', 'temporary_moved', 'temporary'),33 308: ('resume_incomplete', 'resume'),33 308: ('permanent_redirect',),3435 # Client Error.36 400: ('bad_request', 'bad'),37 401: ('unauthorized',),
51 unmodified lines