2 ms·
I think in most cases in HTTP, the server does not "know" the browser has canceled and so continues to execute. I believe it builds the response but can no long
by shireboy 7y ago
I think in most cases in HTTP, the server does not "know" the browser has canceled and so continues to execute. I believe it builds the response but can no longer send it because the underlying TCP connection is closed. So server continues to execute, but response bits never make it back to the client computer. WebSockets and HTTP2 may change that story somewhat.
Edit: actually, I think I'm wrong here. Server does get a canceled socket, and can pass that to server code. In ASP.NET Core, this: https://andrewlock.net/using-cancellationtokens-in-asp-net-core-mvc-controllers/ https://andrewlock.net/using-cancellationtokens-in-asp-net-c...