Skip to content

Fix max redirect count #20428

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

Merged
merged 1 commit into from
Apr 8, 2020
Merged

Conversation

NetworkAndSoftware
Copy link
Contributor

Without this change, RedirectHandler always follows MaxRedirects + 1. If MaxRedirects was initially set to 1, the body of the while statement is executed twice. This defect expresses itself when calling WebApplicationFactory.CreateClient() with WebApplicationFactoryClientOptions.MaxAutomaticRedirections >= 1 and .AllowAutoRedirects = true in integration tests.

Summary of the changes (Less than 80 chars)

  • Detail 1
  • Detail 2

Addresses #bugnumber (in this specific format)

Without this change, RedirectHandler always follows MaxRedirects + 1. If MaxRedirects was initially set to 1, the body of the while statement is executed twice. This defect expresses itself when calling WebApplicationFactory<Startup>.CreateClient() with WebApplicationFactoryClientOptions.MaxAutomaticRedirections >= 1 and .AllowAutoRedirects = true in integration tests.
@ghost ghost added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Apr 1, 2020
Copy link
Contributor

@mkArtakMSFT mkArtakMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR, @NetworkAndSoftware.

@mkArtakMSFT mkArtakMSFT merged commit ada3bdf into dotnet:master Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants