-
-
Notifications
You must be signed in to change notification settings - Fork 257
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
Correct JavaScript MIME types + extensions per RFC 9239 #262
Correct JavaScript MIME types + extensions per RFC 9239 #262
Conversation
Related PRs: |
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.
Hello, and thank you for your pull request. Unfortunately this cannot be accepted as-is, as the db.json
file is a generated file and changes made to it directly will just be overwritten when npm run build
is run. Please see https://github.com/jshttp/mime-db#contributing for how to make contributions to the database.
Certain URLs of the form `https://tools.ietf.org/rfc/${RFC_ID}.txt` redirect multiple times before arriving to the canonical resource. Example: $ curl -sI 'https://tools.ietf.org/rfc/rfc9239.txt' | grep Location Location: https://rfc-editor.org/rfc/rfc9239.txt $ curl -sI 'https://rfc-editor.org/rfc/rfc9239.txt' | grep Location Location: https://www.rfc-editor.org/rfc/rfc9239.txt $ curl -sI 'https://www.rfc-editor.org/rfc/rfc9239.txt' | grep HTTP HTTP/1.1 200 OK `cogent`’s implicit default is to only follow 1 redirect. This patch explicitly configures `cogent` to follow up to two redirects. This is required to properly fetch RFC 9239 and update the JavaScript MIME type entries. Issue: jshttp#194, jshttp#262
Certain URLs of the form `https://tools.ietf.org/rfc/${RFC_ID}.txt` redirect multiple times before arriving to the canonical resource. Example: $ curl -sI 'https://tools.ietf.org/rfc/rfc9239.txt' | grep Location Location: https://rfc-editor.org/rfc/rfc9239.txt $ curl -sI 'https://rfc-editor.org/rfc/rfc9239.txt' | grep Location Location: https://www.rfc-editor.org/rfc/rfc9239.txt $ curl -sI 'https://www.rfc-editor.org/rfc/rfc9239.txt' | grep HTTP HTTP/1.1 200 OK `cogent`’s implicit default is to only follow 1 redirect. This patch explicitly configures `cogent` to follow up to two redirects. This is required to properly fetch RFC 9239 and update the JavaScript MIME type entries. Issue: jshttp#194, jshttp#262
This allows us to have a clean diff to see the impact of the patch in jshttp#263. Issue: jshttp#194, jshttp#262
@dougwilson Thanks. It looks like it’s been a while since the scripts have been run, since there are a bunch of changes unrelated to this new RFC. I also noticed that some tweaks to the scripts are required in order to even pick up the new RFC. Here’s what I think we should do, in order:
|
So the |
789c840
to
b010e3e
Compare
Thanks @dougwilson! It looks like c8e4e30 picks up the upstream |
b010e3e
to
143c935
Compare
This patch updates the MIME type configuration per RFC 9239.
https://www.rfc-editor.org/rfc/rfc9239
First, the recommended MIME type is now
text/javascript
:Second, the
.mjs
extension is now explicitly registered:(mime-db already included the
.mjs
extension prior to this patch, so nochange needed here.)
IANA template: https://www.iana.org/assignments/media-types/text/javascript