Skip to content
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

mime: outdated mimetype for javascript files #7498

Closed
gopherbot opened this issue Mar 8, 2014 · 7 comments
Closed

mime: outdated mimetype for javascript files #7498

gopherbot opened this issue Mar 8, 2014 · 7 comments
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@gopherbot
Copy link

by mhh.dreadlord:

What does 'go version' print?

go version go1.2.1 linux/amd64


What steps reproduce the problem?
If possible, include a link to a program on play.golang.org.

Run the following program:

http://play.golang.org/p/7O41RLu0QX

What happened?

Prints: application/x-javascript

What should have happened instead?

It should print: application/javascript

Please provide any additional information below.

This file http://golang.org/src/pkg/mime/type.go uses an outdated mime type for
".js" extensions, it should be changed to comply with the standard.

Relevant RFC: http://www.rfc-editor.org/rfc/rfc4329.txt
@minux
Copy link
Member

minux commented Mar 8, 2014

Comment 1:

https://golang.org/cl/73070043

Labels changed: added release-go1.3, repo-main.

Status changed to Started.

@minux
Copy link
Member

minux commented Mar 9, 2014

Comment 2:

According to Brad's comment on the CL, we need more proof
that change is safe in the wild.

Labels changed: added release-go1.3maybe, removed release-go1.3.

Status changed to Thinking.

@gopherbot
Copy link
Author

Comment 3 by mhh.dreadlord:

According to the discussion here:
http://stackoverflow.com/q/9664282/165103
text/javascript is used for compatibility with older browsers.
I have made my own research and found that MaxCDN uses application/x-javascript, while
cdnjs uses application/javascript.
Maybe we should check for the types found in the system first, then fallback to these
values if no type information was found?

@minux
Copy link
Member

minux commented Mar 9, 2014

Comment 4:

yes, the current code first checks system mime.types and then fallbacks to hard-code
ones.

@gopherbot
Copy link
Author

Comment 5 by mhh.dreadlord:

I don't know about that, my mime.types file lists application/javascript first, but I
still get the x-javascript one.
You mean the code you just contributed?

@rsc
Copy link
Contributor

rsc commented May 9, 2014

Comment 6:

Labels changed: added release-none, suggested, removed release-go1.3maybe.

@gopherbot gopherbot added Thinking release-none Suggested Issues that may be good for new contributors looking for work to do. labels May 9, 2014
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@ALTree ALTree removed Suggested Issues that may be good for new contributors looking for work to do. Thinking labels Feb 10, 2018
@ALTree ALTree modified the milestones: Unplanned, Go1.11 Feb 10, 2018
@ALTree ALTree added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Feb 10, 2018
@gopherbot
Copy link
Author

Change https://golang.org/cl/120058 mentions this issue: mime: change *.js mime type to application/javascript, not x-javascript

@golang golang locked and limited conversation to collaborators Jun 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

4 participants