Skip to content

Commit c6465d0

Browse files
committed
Fix POST rendering without disabling the "stop render" signal.
1 parent e8aab27 commit c6465d0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Components/Endpoints/src/Rendering/EndpointHtmlRenderer.EventDispatch.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ private Task ReturnErrorResponse(string detailedMessage)
8181

8282
internal async Task SetNotFoundResponseAsync(string baseUri, NotFoundEventArgs args)
8383
{
84-
if (_httpContext.Response.HasStarted)
84+
if (_httpContext.Response.HasStarted ||
85+
// POST waits for quiescence -> rendering the NotFoundPage would be queued for the next batch
86+
// but we want to send the signal to the renderer to stop rendering future batches -> use client rendering
87+
string.Equals(_httpContext.Request.Method, "POST", StringComparison.OrdinalIgnoreCase))
8588
{
8689
if (string.IsNullOrEmpty(_notFoundUrl))
8790
{

0 commit comments

Comments
 (0)