Go to file
Chris Ross (ASP.NET) 07b8318db0 Merged PR 9042: [3.1] Pass RequestAborted to SendFileAsync
This is the 3.1 version of https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore/pullrequest/9014.

The concerns in 3.1 are slightly different than prior versions due to a significant redesign in how the response body was handled.

In 2.1 very few components implemented IHttpSendFileFeature, and most of those that did would eagerly terminate if the request aborted (e.g. HttpSys server). We mainly had to be concerned about the fallback code that did a copy loop when IHttpSendFileFeature wasn't available.

In 3.x the response body Stream, PipeWriter, and SendFileAsync were consolidated onto the new IHttpResponseBodyFeature. Now all servers and component shims support all three ways to send data and we can't make any assumptions about how eagerly they terminate. E.g. many components implemented SendFileAsync using a fallback copy loop, and these components don't have access to RequestAborted to eagerly terminate. This means that in 3.1 we need to pass the RequestAborted token when calling IHttpSendFileFeature.SendFileAsync, as well as any copy loops that have access to the token.

I've primarily fixed the HttpResponse.SendFileAsync extension methods and made sure the other affected components call through here.

[Infrastructure side note]
This commit needs to be rebased on internal/release/3.1 before merging. That branch can't be built locally so I developed this fix based on release/3.1 instead.
2020-07-16 21:37:46 +00:00
.azure/pipelines Changes per PR 2020-06-08 22:19:34 -07:00
.config Use randomized ports in dotnet-serve 2020-06-09 19:20:12 -07:00
.github Added `aspnet-blazor-eng` as a code-owner for the `src/Components` (#20593) 2020-04-07 00:51:44 +00:00
.vscode
docs
eng Merge pull request #23930 from dotnet/wtgodbe/317 2020-07-14 15:51:57 -07:00
src Merged PR 9042: [3.1] Pass RequestAborted to SendFileAsync 2020-07-16 21:37:46 +00:00
.editorconfig
.gitattributes
.gitignore
.gitmodules
CONTRIBUTING.md
Directory.Build.props Build aspnetcore for win-arm64 (#19317) 2020-04-27 00:34:47 -07:00
Directory.Build.targets Include third-party-notices.txt in all packages (#20166) 2020-03-27 10:15:32 -07:00
LICENSE.txt
NuGet.config Update nuget.config 2020-07-14 12:43:57 -07:00
README.md
SECURITY.md
THIRD-PARTY-NOTICES.txt
activate.ps1
activate.sh
build.cmd
build.ps1 Build aspnetcore for win-arm64 (#19317) 2020-04-27 00:34:47 -07:00
build.sh
clean.cmd
clean.ps1
clean.sh
dockerbuild.sh
global.json arcade requires MSBuild 16.3 (#21878) 2020-07-16 12:43:38 -07:00
restore.cmd
restore.sh
startvs.cmd

README.md

ASP.NET Core

ASP.NET Core is an open-source and cross-platform framework for building modern cloud based internet connected applications, such as web apps, IoT apps and mobile backends. ASP.NET Core apps can run on .NET Core or on the full .NET Framework. It was architected to provide an optimized development framework for apps that are deployed to the cloud or run on-premises. It consists of modular components with minimal overhead, so you retain flexibility while constructing your solutions. You can develop and run your ASP.NET Core apps cross-platform on Windows, Mac and Linux. Learn more about ASP.NET Core.

Get Started

Follow the Getting Started instructions in the ASP.NET Core docs.

Also check out the .NET Homepage for released versions of .NET, getting started guides, and learning resources.

How to Engage, Contribute, and Give Feedback

Some of the best ways to contribute are to try things out, file issues, join in design conversations, and make pull-requests.

Reporting security issues and bugs

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) secure@microsoft.com. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.

These are some other repos for related projects:

Code of conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.