Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Redirect API #741

Merged
merged 1 commit into from Dec 16, 2019
Merged

Refactor Redirect API #741

merged 1 commit into from Dec 16, 2019

Conversation

seanmonstar
Copy link
Owner

Changed the redirect types to be from the redirect module:

  • reqwest::RedirectPolicy is now reqwest::redirect::Policy
  • reqwest::RedirectAttempt is now reqwest::redirect::Attempt
  • reqwest::RedirectAction is now reqwest::redirect::Action

Changed behavior of default policy to no longer check for redirect loops
(loops should still be caught eventually by the maximum limit).

Removed the too_many_redirects and loop_detected methods from
Action.

Added error to Action that can be passed any error type.

Closes #717

Changed the redirect types to be from the `redirect` module:

- `reqwest::RedirectPolicy` is now `reqwest::redirect::Policy`
- `reqwest::RedirectAttempt` is now `reqwest::redirect::Attempt`
- `reqwest::RedirectAction` is now `reqwest::redirect::Action`

Changed behavior of default policy to no longer check for redirect loops
(loops should still be caught eventually by the maximum limit).

Removed the `too_many_redirects` and `loop_detected` methods from
`Action`.

Added `error` to `Action` that can be passed any error type.

Closes #717
@seanmonstar seanmonstar merged commit ce43f80 into master Dec 16, 2019
@seanmonstar seanmonstar deleted the redirect-refactor branch December 16, 2019 23:57
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.

over eager loop detection
1 participant