-
-
Notifications
You must be signed in to change notification settings - Fork 34
Abort reading from stream when request has been aborted #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
That's a tough question. I'd check if this is a problem with the stream or if the cancellation token isn't triggered |
@fubar-coder I put logs in the Stream's Maybe this line is the cause?https://github.com/FubarDevelopment/WebDavServer/blob/master/src/FubarDev.WebDavServer/Handlers/Impl/GetResults/WebDavFullDocumentResult.cs#L73 Here's how I tested it: Code
CustomFile.cs
CustomStream.cs
All three logs keep printing " Edit: Related CoreFX PR? |
Good catch! I will fix this. |
@fubar-coder i ran the new code; unfortunately cancellation is still not triggered for me if the client cancels the request. |
Hmm, ok, will try again. I'm currently fighting the build server 😢 |
Thanks for doing this! I'm looking around as well and just found this IIS issue, but I'm only using Kestrel and they fixed something like this here. I'm new to ASP though and not 100% sure if that's related. |
Nice! I'll try it |
Uh oh!
There was an error while loading. Please reload this page.
Hi,
First of all, thanks for the wonderful project! There is a thing that I couldn't figure out yet:
I implemented an
IFileSystem
,IDocument
and so forth. WhenGET
ting large files I noticed that if the request is aborted by the client, the server keeps reading data usingOpenReadAsync
from my subclass ofStream
(the read method keeps being called). ThecancellationToken
doesn't seem to be triggered. Can we accessHttpContext.RequestAborted
somehow? Or is there another preferred way to react to client-side cancellation of a request?I tested it by
cURL
ing the server (curl http://localhost:5809/_dav/file.dat
) and aborting using CTRL+C.Thanks!
The text was updated successfully, but these errors were encountered: