[release/9.0] Return 206 Partial Content on Valid Range for Static Assets by github-actions[bot] · Pull Request #59325 · dotnet/aspnetcore (original) (raw)
Backport of #59160 to release/9.0
Return 206 Partial Content on Valid Range for Static Assets
Fixes an issue where range requests resulted in a 416 error.
Description
The status code that we were returning was incorrect. The fix corrects the behavior and includes the appropriate test to cover the scenario.
Fixes #58829
Customer Impact
Customers can't serve media content (video, audio) as the browser issues a range request for it, and the result has the wrong status code. This only applies when using the new MapStaticAssets
API introduced in .NET 9, so customers will only be impacted if they manually updated their app to use the new API, or if they created their project from a .NET 9 project template.
Regression?
- Yes
- No
The bug only occurs when using a newly introduced API in .NET 9.
Risk
- High
- Medium
- Low
The fix is simple, it has automated tests, and it has been manually validated.
Verification
- Manual (required)
- Automated
Packaging changes reviewed?
- Yes
- No
- N/A
When servicing release/2.1
- Make necessary changes in eng/PatchConfig.props