-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Return 206 Partial Content on Valid Range for Static Assets #59160
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
Return 206 Partial Content on Valid Range for Static Assets #59160
Conversation
javiercn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thank you!
|
@javiercn could you merge? I don't have permissions. Thanks |
|
@melotic thanks for the contribution! |
|
@javiercn Thanks for the review + merge! This is an awesome feature. I'm not familiar with the ASP.NET Core release process, but is there any chance of a bug fix release with this PR? This is currently preventing us from enabling caching with Azure Front Door since it fetches contents in ranges. 1 The backend returns a 416 from this bug, which AFD happily forwards to clients 😢 Footnotes |
|
@melotic I'll try to bring this for the next patch release, however, bear in mind the holidays are approaching. |
|
/backport to release/9.0 |
|
Started backporting to release/9.0: https://github.com/dotnet/aspnetcore/actions/runs/12174988321 |
…Assets (#59160) * Return 206 Partial Content on Valid Range for Static Assets
Currently, static assets returns a 416 Range Not Satisfiable when given a satisfiable range instead of a 206 Partial Content.
Fixes the bug and adds a test for it.
Fixes #58829
Additionally, the current logic doesn't return a 416 when the supplied range is unsatisfiable. I'll file a separate issue and PR.