You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2017/08/04 16:17:32 UTC

[Bug 61383] New: *.mjs files should be part of mime application/javascript

https://bz.apache.org/bugzilla/show_bug.cgi?id=61383

            Bug ID: 61383
           Summary: *.mjs files should be part of mime
                    application/javascript
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_mime
          Assignee: bugs@httpd.apache.org
          Reporter: bradley.meck@gmail.com
  Target Milestone: ---

Javascript Language body is re-using the MIME for a new parse goal:
https://github.com/tc39/ecma262/issues/322

Used by Node:
https://github.com/nodejs/node-eps/blob/6cc060e94e56859bdb446a0820ef4704731ff0a8/002-es-modules.md
https://github.com/nodejs/node/pull/14369

Already being merged into other tools:
https://github.com/Microsoft/vscode/pull/25747

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61383] *.mjs files should be part of mime text/javascript

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61383

--- Comment #11 from Mathias Bynens <mt...@google.com> ---
RFC 9239 is now published, making this official:
https://www.rfc-editor.org/rfc/rfc9239

Pull request is up: https://github.com/apache/httpd/pull/318 Please take a
look.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61383] *.mjs files should be part of mime text/javascript

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61383

Mathias Bynens <mt...@google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61383] *.mjs files should be part of mime text/javascript

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61383

Mathias Bynens <mt...@google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|*.mjs files should be part  |*.mjs files should be part
                   |of mime                     |of mime text/javascript
                   |application/javascript      |

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61383] *.mjs files should be part of mime text/javascript

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61383

Mathias Bynens <mt...@google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mths@google.com

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61383] *.mjs files should be part of mime application/javascript

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61383

--- Comment #7 from Bradley Farias <br...@gmail.com> ---
Bringing this up again, lots of tools use this and Node's ESM is no longer
experimental.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61383] *.mjs files should be part of mime text/javascript

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61383

--- Comment #12 from Mathias Bynens <mt...@google.com> ---
Created attachment 38299
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38299&action=edit
Attaching patch from https://github.com/apache/httpd/pull/318

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61383] *.mjs files should be part of mime application/javascript

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61383

--- Comment #8 from Quentin Grimaud <qu...@gmail.com> ---
A few more links in favour of .mjs extension:

- https://v8.dev/features/modules#mjs
-
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#aside_%E2%80%94_.mjs_versus_.js

As a proof of adoption, this last link mentions "Servers that already serve
.mjs files correctly include GitHub Pages and http-server for Node.js."

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61383] *.mjs files should be part of mime text/javascript

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61383

Mathias Bynens <mt...@google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #13 from Mathias Bynens <mt...@google.com> ---
The PR has been merged. I guess this issue can be closed now?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61383] *.mjs files should be part of mime application/javascript

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61383

--- Comment #3 from Jacob Champion <jc...@apache.org> ---
(In reply to Bradley Farias from comment #2)
> What level of support are you needing. If I move the draft to accepted is
> that enough?
Now you have me worried/confused. Is that document you linked to binding in any
way on the Javascript community? Do you have the power to "accept" it yourself
-- and if so, should we use it as proof of standardization? ;D

My point is not that we should meet an arbitrary milestone that I'd be making
up on the spot, but that we should feel like the types we add are actually
standards (either de facto or otherwise). The stuff you've linked to highlights
relatively recent arguments over whether a new MIME suffix should be
registered, whether the extension should be .mjs or .jsm, etc.

IMO we should add this to httpd once the world says "yes, *this* is how it is."
Which does imply a slight bit of lag time.

> This issue is being
> brought up because it was a web compatiblity concern where people cannot use
> the same files due to lack of MIME support.
Right. Server admins have full power over their mime.types, and if they need
their servers to support this, they don't have to wait for us. We're not
blocking early adoption as far as I can tell.

> Would written statements from browser vendors sway anything?
Sure, it'd certainly give us a better idea of who intends to make use of this.

Keep in mind that I am not the sole gatekeeper for this. If, at any point, an
httpd dev is convinced, then in all likelihood it's going in. I'm just saying
that I'm not personally convinced *yet*.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61383] *.mjs files should be part of mime application/javascript

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61383

--- Comment #5 from Bradley Farias <br...@gmail.com> ---
Considering Node 12+ now uses the .mjs MIME publicly and it is present even in
WHATWG's HTML specification for clarity
https://github.com/whatwg/html/pull/3810 how would I go about bumping this
issue?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61383] *.mjs files should be part of mime text/javascript

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61383

Mathias Bynens <mt...@google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |https://github.com/apache/h
                   |                            |ttpd/pull/318

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61383] *.mjs files should be part of mime application/javascript

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61383

--- Comment #1 from Jacob Champion <jc...@apache.org> ---
Thanks for the heads up! Based on those links, I think this needs to be baked a
little bit more before we add it to the official mime.types. You've linked to a
draft proposal, and IMO it belongs in httpd after it's standardized and/or in
wide use.

In the meantime, server admins are welcome to adjust the mime.types themselves
if they need it, so we're not obstructing the rollout.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61383] *.mjs files should be part of mime application/javascript

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61383

--- Comment #4 from Eric Covener <co...@gmail.com> ---
IIUC the bar for httpd to list a type is registration in IANA, but the bar for
adding an extension to an existing type is to show it in common use (assuming
it's not already in use elsewhere) or present in some standard.

https://www.iana.org/assignments/media-types/media-types.xml

Where we'd normally look to confirm an extension:
https://www.iana.org/assignments/media-types/application/javascript

I didn't find the specific references here too compelling but someone else
might be more familiar/comfortable with it.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61383] *.mjs files should be part of mime application/javascript

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61383

--- Comment #9 from Mathias Bynens <mt...@google.com> ---
(In reply to Eric Covener from comment #4)
> IIUC the bar for httpd to list a type is registration in IANA, but the bar
> for adding an extension to an existing type is to show it in common use
> (assuming it's not already in use elsewhere) or present in some standard.
> 
> https://www.iana.org/assignments/media-types/media-types.xml
> 
> Where we'd normally look to confirm an extension:
> https://www.iana.org/assignments/media-types/application/javascript
> 
> I didn't find the specific references here too compelling but someone else
> might be more familiar/comfortable with it.

The media type registry at
https://www.iana.org/assignments/media-types/media-types.xhtml has been updated
and now explicitly includes the .mjs extension for the text/javascript media
type.

The link you referenced,
https://www.iana.org/assignments/media-types/application/javascript, now shows
that application/javascript is OBSOLETE (in favor of text/javascript).

The relevant entry to look at is
https://www.iana.org/assignments/media-types/text/javascript, which now
explicitly lists both the .js and .mjs extensions.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61383] *.mjs files should be part of mime application/javascript

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61383

Quentin Grimaud <qu...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |quentin.grimaud@gmail.com

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61383] *.mjs files should be part of mime text/javascript

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61383

--- Comment #10 from Mathias Bynens <mt...@google.com> ---
I’ve prepared a patch here:
https://github.com/apache/httpd/compare/trunk...mathiasbynens:fix-js-mime-and-extensions?expand=1

I’ll hold off on sending a PR until the RFC has officially been published
(which should be soon).

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61383] *.mjs files should be part of mime application/javascript

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61383

--- Comment #6 from Bradley Farias <br...@gmail.com> ---
The ECMAScript specification itself now has a reference to .mjs
https://tc39.es/ecma262/#sec-hostresolveimportedmodule

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61383] *.mjs files should be part of mime application/javascript

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61383

Bradley Farias <br...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Alias|                            |MJS

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 61383] *.mjs files should be part of mime application/javascript

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61383

--- Comment #2 from Bradley Farias <br...@gmail.com> ---
What level of support are you needing. If I move the draft to accepted is that
enough? Is the merged PR for node needed if not? This issue is being brought up
because it was a web compatiblity concern where people cannot use the same
files due to lack of MIME support.

Would written statements from browser vendors sway anything?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org