fix: preserve request method changes across redirect chains in Session.resolve_redirects#97
Open
label-hook[bot] wants to merge 1217 commits into
Open
fix: preserve request method changes across redirect chains in Session.resolve_redirects#97label-hook[bot] wants to merge 1217 commits into
label-hook[bot] wants to merge 1217 commits into
Conversation
Add clarification to MissingSchema error
Use builtin_str for all auto-set header values.
otherwise python3.4 warns
close files in setup.py
Modified the tests so that they use py.test convention
restoring pull request fixing psf#1623
Improve the PreparedRequest docs.
Fix for AppEngine
loosen URL handling for non-native protocols
One last Charade reference to remove here.
Reference at the earliest opportunity that Server-Name-Indication is a limitation of Python 2.6 and 2.7. Avoid describing it as a Requests issue.
Made `.status_code` and `.reason` consistent with one another, adding some examples. Addresses psf#1225.
Document the `Response.reason` attribute.
Remove unused loggers.
…coding Reinstate falling back to self.text for JSON responses
Document requirements for SNI support on Python2
Add request to RequestException
New Response property, .is_redirect.
- Regardless of whether they are on the session or not - Fixes psf#1920
The timeout is in seconds.
- Charade is gone, long live Chardet. - cacert.pem is now taken wholesale from Mozilla so we need to display that itis licensed under the MPL2.0
Fixes Issue psf#1803
Charade -> Chardet and Add cacert.pem license
Do not set headers with None value
Add timeout to stream with testing
Some people will assume that .raw() is present, and they shouldn't get AttributeErrors when they make that assumption on a pickled Response. However, @kennethreitz has asked that we not be too dependent on urllib3. For that reason, set to None.
Pickled Responses should include a None value for the raw attribute
Fix Accept-Encoding in default headers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes an issue where
Session.resolve_redirectsincorrectly reverted to the original request method for subsequent redirects in a chain, instead of preserving method changes made by intermediate redirects (e.g., POST → GET conversion on 303 See Other).Changes
Session.resolve_redirectsmethod inrequests/sessions.pyto track and use the current request state instead of always copying from the original requestTesting
The fix addresses the specific scenario described in the issue:
Baseline test suite results show no new test failures introduced by this change.
Closes #96
Closes #96