Closed Peperud closed 5 years ago
Check IOwinRequest.CallCancelled.IsCancellationRequested
https://github.com/aspnet/AspNetKatana/blob/40de8011dab132b020e8d6e89239f4a0bda7d82c/src/Microsoft.Owin/IOwinRequest.cs#L133-L138
@Tratcher Thanks Chris, it was in front of me, no idea how I missed it. A follow up - is throwing still the (preferred/best) way to abort a request in Katana?
If the client has already disconnected then it's just a matter of how you want the request to show up in the logs. E.g. you could return something like a 404, but that might be confusing in your logs. Throwing tends to be the most understandable.
499 seems to be the appropriate code. Might go that way, since at this point the situation is handled. Thanks.
There is
Request.IsClientDisconnected
forHttpContext
pages. What is the best way to do the same in OWIN/Katana?Seems like a request cancelling middleware could be a decent choice to deal with https://github.com/aspnet/AspNetWebStack/issues/249