-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Change .js MIME type to text/javascript #40771
Change .js MIME type to text/javascript #40771
Conversation
@@ -152,7 +152,7 @@ public FileExtensionContentTypeProvider() | |||
{ ".jpe", "image/jpeg" }, | |||
{ ".jpeg", "image/jpeg" }, | |||
{ ".jpg", "image/jpeg" }, | |||
{ ".js", "application/javascript" }, | |||
{ ".js", "text/javascript" }, |
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.
@dotnet/dotnet-maui-blazor-eng - we need to verify this works in all the WebViews. I'd be very surprised if it doesn't, but we need to positively verify that it does.
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.
In particular, things like older Androids with older Chromes, which we do still support.
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.
@Eilon Makes sense. I'm not familiar with your test infrastructure for that stuff; would someone on your team be able to do that test pass before this PR is merged, or would this be picked up post-merge? I'm happy to hold off on merging this if needed, just let me know how to proceed :).
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.
Pinging @TanayParikh @javiercn @MackinnonBuck who can help you with this.
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.
Spoke offline, thanks all!
The default MIME type for `.js` files changed to `text/javascript` in dotnet/aspnetcore#40771 so the test needed to be updated, too.
[main] Update dependencies from dotnet/arcade - update to run on dotnet 7 - update to stable sdk - update mime type to align with new value The default MIME type for `.js` files changed to `text/javascript` in dotnet/aspnetcore#40771 so the test needed to be updated, too. - update minimum sdk version for vscode extension - Merge remote-tracking branch 'upstream/main' into darc-main-f75372cd-0832-40a1-95fc-5022c8550314 - update test package versions - add linux test retry - don't fail build on docker build failures - update test command - run tests one assembly at a time - update extension lab packages - skip ildasm test - improve log message - log errors - run tests on a class-by-class basis
Fix #34323
This changes the MIME type for .js to
text/javascript
, and updates response compression to includetext/javascript
as well.I also added .mjs to the copy of FileExtensionContentTypeProvider.cs that's in WebView sources, which seems to have been missed in #34318.
See:
https://datatracker.ietf.org/doc/html/draft-ietf-dispatch-javascript-mjs
https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages