Skip to content

Conversation

@transmissions11
Copy link

@transmissions11 transmissions11 commented Jan 8, 2026

this unfortunately may be breaking for some users, so if strong backwards compatibility is important maybe wait to include this in a major release or disregard it entirely, but:

both libcurl and python's requests library do not preserve POST on redirects for 301/302/303 statuses by default (see https://curl.se/libcurl/c/CURLOPT_POSTREDIR.html). this is crucial for various common OAuth/SAML flows which expect GET requests after redirects.

given this behavior is the default in other widely-used environments (notably browsers as well), and particularly because cpr aims to be a "spiritual port" of requests, i believe NONE is a much more sensible default than POST_ALL.

@transmissions11 transmissions11 changed the title default to none for PostRedirectFlags default to NONE for PostRedirectFlags Jan 8, 2026
@transmissions11
Copy link
Author

ah sorry looks like i'd need to update some tests, if you think you'd be willing to merge i can go ahead and fix them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant