Problem/Motivation
IETF published https://www.ietf.org/rfc/rfc9239.pdf
It updates JavaScript MIME type registrations to align with reality:
- The JavaScript MIME type is now unambiguously
text/javascript. .mjsis now a registered filename extension, specifically for JavaScript modules.
AFAICS, Drupal uses the now deprecated application/javascript in its internals and in MIME type guessing.
Proposed resolution
Adjust Drupal to reflect the standard.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3284133
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3284133-ietf-rfc-9239
changes, plain diff MR !2355
Comments
Comment #3
mondrakeComment #4
nod_+1, straightforward.
Thanks :)
Comment #5
cilefen commentedIs there any possibility this is a behavioral backward-compatibility break?
Comment #6
lauriiiIt seems like httpd started using
text/javascript3 months ago: https://github.com/apache/httpd/commit/f4230a5e7d27ddddad44172657356f2c5... and https://github.com/apache/httpd/blob/trunk/CHANGES#L20.Comment #7
alexpottGiven apache has this in its change record I guess we shoudl too
Also I think we should update \Drupal\system\Controller\JsAssetController::$contentType too
Comment #8
mondrakeComment #9
mondrakeRebased to 10.1.x
Done.
Comment #10
mondrakeAdded draft CR.
Comment #11
smustgrave commentedTried applying the MR locally but appears to have an issue.
Read the CR and it makes sense.
So just needs a reroll I believe.
Comment #12
mondrakeRerolled
Comment #13
smustgrave commentedThanks for the super quick turnaround!
Comment #14
alexpottRe #5 I don't think so. text/javascript has been valid for a while - it was obsolete for a while but now it has been brought back - as far as I can see.
Committed 58caf0f and pushed to 10.1.x. Thanks!