Correct JavaScript MIME types + extensions per RFC 9239#262
Correct JavaScript MIME types + extensions per RFC 9239#262dougwilson merged 1 commit intojshttp:masterfrom
Conversation
|
Related PRs: |
dougwilson
left a comment
There was a problem hiding this comment.
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
.mjsextension is now explicitly registered:(mime-db already included the
.mjsextension prior to this patch, so nochange needed here.)
IANA template: https://www.iana.org/assignments/media-types/text/javascript