Why can't the HttpResponse be changed after 'next' call?
<pre><code>public void Configure(IApplicationBuilder app) {
    app.Map("/hahaha", HandleMapTest);
    app.Run(async (context) =&gt; {
        await context.Response.WriteAsync("Hello World!");
    });
}

public static void HandleMapTest(IApplicationBuilder app) {
    app.Use(async (context, next) =&gt; {
        await context.Response.WriteAsync("Before!");
        await next.Invoke();
        await context.Response.WriteAsync("After!");
    });
}
</code></pre>

<p>The resulted response only has "Before!After!", but missing the "Hello World!". Why does it happen?</p>

<p>The <a href="https://docs.asp.net/en/latest/fundamentals/middleware.html#creating-a-middleware-pipeline-with-iapplicationbuilder" rel="nofollow">Asp.net docs</a> said:</p>

<blockquote>
  <p>Avoid modifying HttpResponse after invoking next, one of the next components in the pipeline may have written to the response, <strong>causing it to be sent to the client</strong>.</p>
</blockquote>

<p>Which I don't understand what the "cause it to be sent to the client" mean.</p>