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

Pipeline is rejoined only if middleware does not short-circuit #33662

Closed
deep-outcome opened this issue Sep 19, 2024 · 2 comments · Fixed by #34405
Closed

Pipeline is rejoined only if middleware does not short-circuit #33662

deep-outcome opened this issue Sep 19, 2024 · 2 comments · Fixed by #34405
Assignees
Labels
aspnet-core/svc fundamentals/subsvc seQUESTered Identifies that an issue has been imported into Quest. Source - Docs.ms Docs Customer feedback via GitHub Issue ⌚ Not Triaged

Comments

@deep-outcome
Copy link
Contributor

deep-outcome commented Sep 19, 2024

Description

From https://learn.microsoft.com/en-us/aspnet/core/fundamentals/middleware/?view=aspnetcore-8.0#branch-the-middleware-pipeline

UseWhen also branches the request pipeline based on the result of the given predicate. Unlike with MapWhen, this branch is rejoined to the main pipeline if it doesn't short-circuit or contain a terminal middleware:

From https://learn.microsoft.com/en-us/aspnet/core/fundamentals/middleware/?view=aspnetcore-8.0

When a middleware short-circuits, it's called a terminal middleware because it prevents further middleware from processing the request.

Thus, as I understand, there has to be either "doesn't short-circuit" or "contain a terminal middleware" but no both.

Page URL

https://learn.microsoft.com/en-us/aspnet/core/fundamentals/middleware/?view=aspnetcore-8.0

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/fundamentals/middleware/index.md

Document ID

3926c686-0ccc-f9fe-ca52-0134612a1623

Article author

@tdykstra


Associated WorkItem - 357008

@tdykstra
Copy link
Contributor

@bravequickcleverfibreyarn What change to the text would you propose to fix this?

@deep-outcome
Copy link
Contributor Author

I would propose:

  • either "if it doesn't short-circuit:"
  • or " if it doesn't contain a terminal middleware:"

@tdykstra tdykstra self-assigned this Dec 19, 2024
@dotnetrepoman dotnetrepoman bot added mapQuest clean move and removed mapQuest clean move labels Dec 19, 2024
@tdykstra tdykstra added the reQUEST Triggers an issue to be imported into Quest label Dec 19, 2024
@sequestor sequestor bot added seQUESTered Identifies that an issue has been imported into Quest. and removed reQUEST Triggers an issue to be imported into Quest labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aspnet-core/svc fundamentals/subsvc seQUESTered Identifies that an issue has been imported into Quest. Source - Docs.ms Docs Customer feedback via GitHub Issue ⌚ Not Triaged
Projects
Development

Successfully merging a pull request may close this issue.

3 participants