Skip to content
Myr

Resolve @piotr-dobrogost's concerns

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

Piotr had good objections to my not re-sending the body of the request on 307.

authored by Ian Cordasco · committed by Ian Cordasco · parent e7bc9bf · Browse files · 1 file+9 added−8 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+9 added−8 removed

  • other:+9 added−8 removed

1 file+9 added−8 removed

modified:requests/sessions.py+9 added-8 removed
123 unmodified lines
124 method = 'GET'125126 prepared_request.method = method127128 # Remove the cookie headers that were sent.129 headers = prepared_request.headers130 for h in ('Cookie', 'Content-Length'):131 try:132 del headers[h]133 except KeyError:134 pass128 if resp.status_code is not codes.temporary:129 if 'Content-Length' in prepared_request.headers:130 del prepared_request.headers['Content-Length']131136 prepared_request.body = None132 prepared_request.body = None133134 try:135 del prepared_request.headers['Cookie']136 except KeyError:137 pass138139 resp = self.send(140 prepared_request,141 stream=stream,142 timeout=timeout,
313 unmodified lines