Skip to content

MapStaticAssets breaks Browser Range Requests for large media files. #59631

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

Closed
1 task done
viniciusmiguel opened this issue Dec 24, 2024 · 1 comment
Closed
1 task done
Labels
area-blazor Includes: Blazor, Razor Components

Comments

@viniciusmiguel
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

On .NET V9.0.100

When creating a Blazor app, that exposes a 8MB mp4 video file on wwwroot.
https://github.com/user-attachments/assets/4172f0e8-dee1-44a4-a7fa-58eed5bded6f

Using:

app.MapStaticAssets();

It causes browsers to get a 416 Range Not Satisfiable error.

The issue disappears when using the

app.UseStaticFiles(); 

instead.

Expected Behavior

Kestrel works properly with ranges.

Steps To Reproduce

Create a Blazor App on NET9 with default template
Add the attached file to wwwroot.

Add a video tag to the home page.

Exceptions (if any)

No response

.NET Version

9.0.100

Anything else?

No response

@ghost ghost added the area-blazor Includes: Blazor, Razor Components label Dec 24, 2024
@javiercn
Copy link
Member

javiercn commented Jan 7, 2025

@viniciusmiguel thanks for contacting us.

This is a dupe of #58829, we are planning to patch-it on a future release.

@javiercn javiercn closed this as completed Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

No branches or pull requests

2 participants