Skip to content

Commit a37ec81

Browse files
committed
Fix - treat POST as POST, even when re-execution middleware is set.
1 parent 7b9e6c9 commit a37ec81

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Components/Endpoints/src/RazorComponentEndpointInvoker.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,10 @@ await _renderer.InitializeStandardComponentServicesAsync(
175175
private async Task<RequestValidationState> ValidateRequestAsync(HttpContext context, IAntiforgery? antiforgery)
176176
{
177177
var processPost = HttpMethods.IsPost(context.Request.Method) &&
178-
// Disable POST functionality during exception handling and reexecution.
178+
// Disable POST functionality during exception handling.
179179
// The exception handler middleware will not update the request method, and we don't
180180
// want to run the form handling logic against the error page.
181-
context.Features.Get<IExceptionHandlerFeature>() == null &&
182-
context.Features.Get<IStatusCodePagesFeature>() == null;
181+
context.Features.Get<IExceptionHandlerFeature>() == null;
183182

184183
if (processPost)
185184
{

0 commit comments

Comments
 (0)