-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Add explicit conversion for value-type returning handlers with filters #57428
Conversation
/backport to release/8.0 |
Started backporting to release/8.0: https://github.com/dotnet/aspnetcore/actions/runs/10839386689 |
@captainsafia backporting to release/8.0 failed, the patch most likely resulted in conflicts: $ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Add explicit conversion for value-type returning handlers with filters
Using index info to reconstruct a base tree...
M src/Http/Http.Extensions/src/RequestDelegateFactory.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Http/Http.Extensions/src/RequestDelegateFactory.cs
CONFLICT (content): Merge conflict in src/Http/Http.Extensions/src/RequestDelegateFactory.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Add explicit conversion for value-type returning handlers with filters
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
@captainsafia an error occurred while backporting to release/8.0, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
/backport to release/9.0 |
Started backporting to release/9.0: https://github.com/dotnet/aspnetcore/actions/runs/10945223628 |
Addresses #52128.
This PR fixes a bug with the handling of value type-returning handlers that are used in conjunction with endpoint filters. Such as:
This currently throws:
Because the return type requires an explicit conversion before being wrapped as a
ValueTask<object>
to confirm with the EndpointFilterDelegate's signature.Note: I'm considering this for backport to .NET 8 and .NET 9.