Gerrit Bot has uploaded this change for review.
mime: add .ico to builtin types
Dear go maintainer.
I added the *.ico* extension as *image/x-icon" to the *builtinTypesLower* map on the *mime* package.
I think this fits as a trivial change and did not open an issue.
There's a discussion about this mime type: some say it is `image/vnd.microsoft.icon` but I've heard the most used is `image/x-icon`, so I decided to use the latter.
This is the first time I try to contribute to `go`, I hope this PR is correct.
Change-Id: I6a8bfc7cc8fa19adda1ccacfb5b52a9148ac713e
GitHub-Last-Rev: 139d86bddcb4cba59d3be2ed4138949155fceeba
GitHub-Pull-Request: golang/go#50802
---
M src/mime/type.go
1 file changed, 22 insertions(+), 0 deletions(-)
diff --git a/src/mime/type.go b/src/mime/type.go
index bdb8bb3..2c3971a 100644
--- a/src/mime/type.go
+++ b/src/mime/type.go
@@ -63,6 +63,7 @@
".gif": "image/gif",
".htm": "text/html; charset=utf-8",
".html": "text/html; charset=utf-8",
+ ".ico": "image/x-icon",
".jpeg": "image/jpeg",
".jpg": "image/jpeg",
".js": "text/javascript; charset=utf-8",
To view, visit change 380734. To unsubscribe, or for help writing mail filters, visit settings.
Congratulations on opening your first change. Thank you for your contribution!
Next steps:
A maintainer will review your change and provide feedback. See
https://golang.org/doc/contribute.html#review for more info and tips to get your
patch through code review.
Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.
During May-July and Nov-Jan the Go project is in a code freeze, during which
little code gets reviewed or merged. If a reviewer responds with a comment like
R=go1.11 or adds a tag like "wait-release", it means that this CL will be
reviewed as part of the next development cycle. See https://golang.org/s/release
for more details.
Attention is currently required from: Damien Neil.
1 comment:
Patchset:
Thanks. Is there any official spec that defines ".ico"? IANA maintains a list of MIME types at https://www.iana.org/assignments/media-types/media-types.xhtml but I don't see ".ico" on that list.
To view, visit change 380734. To unsubscribe, or for help writing mail filters, visit settings.
Patchset:
To view, visit change 380734. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Damien Neil, Ian Lance Taylor.
1 comment:
Patchset:
Thanks. Is there any official spec that defines ". […]
There is:
https://www.iana.org/assignments/media-types/image/vnd.microsoft.icon
To view, visit change 380734. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Damien Neil, Brian Mayer.
1 comment:
Patchset:
There is: […]
Thanks. That suggests that the MIME type should be image/vnd.microsoft.icon, not image/x-icon.
To view, visit change 380734. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Damien Neil, Ian Lance Taylor, Brian Mayer.
1 comment:
Patchset:
Thanks. That suggests that the MIME type should be image/vnd.microsoft.icon, not image/x-icon.
Apparently it's disputed whether the Microsoft assignment is correct, with Wikipedia linking to a source saying it was submitted by a third party.
There are also reported compatibility issues with image/vnd.microsoft.icon, both with clients not understanding it (though it should be rare with modern browsers) and with clients actually expecting ico format files (as opposed to any other image file type renamed to (favicon).ico which was/is common).
To view, visit change 380734. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Damien Neil, Sean Liao, Ian Lance Taylor.
1 comment:
Patchset:
Apparently it's disputed whether the Microsoft assignment is correct, with Wikipedia linking to a so […]
Exactly, I chose image/x-icon because that's what most servers use, but I don't mind changing that to image/vnd.microsoft.icon.
To view, visit change 380734. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Sean Liao, Brian Mayer, Ian Lance Taylor.
1 comment:
Patchset:
Exactly, I chose image/x-icon because that's what most servers use, but I don't mind changing that t […]
If there is dispute over the correct type to use here, I don't think we should attempt to resolve that dispute in the mime package.
To view, visit change 380734. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Damien Neil, Sean Liao, Ian Lance Taylor.
1 comment:
Patchset:
If there is dispute over the correct type to use here, I don't think we should attempt to resolve th […]
PHP and python return image/vnd.microsoft.icon. And https://datatracker.ietf.org/doc/html/rfc2046#section-4.2 says (from what I understood) that we should at least return "application/octet-stream" for an unrecognized image type. So I think that if we do not reach an agreement here we could opt for this "application/octet-stream".
To view, visit change 380734. To unsubscribe, or for help writing mail filters, visit settings.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |