Le Thu, Jan 25, 2024 at 12:34:51PM +0700, Maxim Nikulin a écrit : > > I suggest to put the "es" extension last, or perhaps even to add > text/ecmascript record for it. It would allow to avoid accidents like > > python3 -c 'import mimetypes; > print(mimetypes.guess_extension("text/javascript"))' > .es
Le Wed, Aug 28, 2024 at 12:42:16AM +0200, Andrea Pappacoda a écrit : > +text/ecmascript es mjs > -text/javascript es js mjs > +text/javascript js mjs Hello, thanks for your reports! My understanding of the media type declarations is that all ecmascript files should be served as text/javascript, which is why I added the `es` extension to that type. In addition, I am aware that some tools are going to pick the first occurence of a file extension in the list and associate it the media type it came with. Therefore if I would add `text/ecmascriopt es mjs`, some software would serve files with the `mjs` extension as ecmascript instead of javascript. This is another reason why there are no ecmascript types in /etc/mime.types. I was not aware that some tools use the order of extensions listed in /etc/mime.types as an indication of priority. I am not sure that this meaning is defined or conveyed in the media type declarations published by the IANA… Would it be fine for both you that I change text/javascript to place the `es` extension last in the list? Have a nice Sunday, Charles -- Charles Plessy Nagahama, Yomitan, Okinawa, Japan Tooting from work, https://fediscience.org/@charles_plessy Tooting from home, https://framapiaf.org/@charles_plessy