[go] mime: add .ico to builtin types

26 views
Skip to first unread message

Gerrit Bot (Gerrit)

unread,
Jan 25, 2022, 10:51:25 AM1/25/22
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gerrit Bot has uploaded this change for review.

View Change

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.

Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I6a8bfc7cc8fa19adda1ccacfb5b52a9148ac713e
Gerrit-Change-Number: 380734
Gerrit-PatchSet: 1
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-MessageType: newchange

Gopher Robot (Gerrit)

unread,
Jan 25, 2022, 10:57:26 AM1/25/22
to Gerrit Bot, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

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.

View Change

    To view, visit change 380734. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I6a8bfc7cc8fa19adda1ccacfb5b52a9148ac713e
    Gerrit-Change-Number: 380734
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-Comment-Date: Tue, 25 Jan 2022 15:57:20 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Ian Lance Taylor (Gerrit)

    unread,
    Jan 25, 2022, 12:47:24 PM1/25/22
    to Gerrit Bot, goph...@pubsubhelper.golang.org, Damien Neil, Gopher Robot, golang-co...@googlegroups.com

    Attention is currently required from: Damien Neil.

    View Change

    1 comment:

    To view, visit change 380734. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I6a8bfc7cc8fa19adda1ccacfb5b52a9148ac713e
    Gerrit-Change-Number: 380734
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Damien Neil <dn...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
    Gerrit-Attention: Damien Neil <dn...@google.com>
    Gerrit-Comment-Date: Tue, 25 Jan 2022 17:47:18 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Brian Mayer (Gerrit)

    unread,
    Jan 25, 2022, 3:20:52 PM1/25/22
    to Gerrit Bot, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Damien Neil, Gopher Robot, golang-co...@googlegroups.com

    Attention is currently required from: Damien Neil.

    View Change

    1 comment:

    To view, visit change 380734. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I6a8bfc7cc8fa19adda1ccacfb5b52a9148ac713e
    Gerrit-Change-Number: 380734
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Damien Neil <dn...@google.com>
    Gerrit-CC: Brian Mayer <blee...@gmail.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
    Gerrit-Attention: Damien Neil <dn...@google.com>
    Gerrit-Comment-Date: Tue, 25 Jan 2022 20:00:17 +0000

    Brian Mayer (Gerrit)

    unread,
    Jan 25, 2022, 3:20:52 PM1/25/22
    to Gerrit Bot, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Damien Neil, Gopher Robot, golang-co...@googlegroups.com

    Attention is currently required from: Damien Neil, Ian Lance Taylor.

    View Change

    1 comment:

    To view, visit change 380734. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I6a8bfc7cc8fa19adda1ccacfb5b52a9148ac713e
    Gerrit-Change-Number: 380734
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Damien Neil <dn...@google.com>
    Gerrit-CC: Brian Mayer <blee...@gmail.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
    Gerrit-Attention: Damien Neil <dn...@google.com>
    Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
    Gerrit-Comment-Date: Tue, 25 Jan 2022 20:17:03 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Ian Lance Taylor <ia...@golang.org>
    Gerrit-MessageType: comment

    Ian Lance Taylor (Gerrit)

    unread,
    Jan 25, 2022, 3:24:01 PM1/25/22
    to Gerrit Bot, Brian Mayer, goph...@pubsubhelper.golang.org, Damien Neil, Gopher Robot, golang-co...@googlegroups.com

    Attention is currently required from: Damien Neil, Brian Mayer.

    View Change

    1 comment:

    • Patchset:

      • Patch Set #1:

        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.

    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I6a8bfc7cc8fa19adda1ccacfb5b52a9148ac713e
    Gerrit-Change-Number: 380734
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Damien Neil <dn...@google.com>
    Gerrit-CC: Brian Mayer <blee...@gmail.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
    Gerrit-Attention: Damien Neil <dn...@google.com>
    Gerrit-Attention: Brian Mayer <blee...@gmail.com>
    Gerrit-Comment-Date: Tue, 25 Jan 2022 20:23:57 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Brian Mayer <blee...@gmail.com>

    Sean Liao (Gerrit)

    unread,
    Jan 25, 2022, 4:19:45 PM1/25/22
    to Gerrit Bot, Brian Mayer, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Damien Neil, Gopher Robot, golang-co...@googlegroups.com

    Attention is currently required from: Damien Neil, Ian Lance Taylor, Brian Mayer.

    View Change

    1 comment:

    • Patchset:

      • Patch Set #1:

        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.

    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I6a8bfc7cc8fa19adda1ccacfb5b52a9148ac713e
    Gerrit-Change-Number: 380734
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Damien Neil <dn...@google.com>
    Gerrit-CC: Brian Mayer <blee...@gmail.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
    Gerrit-CC: Sean Liao <seank...@gmail.com>
    Gerrit-Attention: Damien Neil <dn...@google.com>
    Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
    Gerrit-Attention: Brian Mayer <blee...@gmail.com>
    Gerrit-Comment-Date: Tue, 25 Jan 2022 21:19:38 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Ian Lance Taylor <ia...@golang.org>
    Comment-In-Reply-To: Brian Mayer <blee...@gmail.com>
    Gerrit-MessageType: comment

    Brian Mayer (Gerrit)

    unread,
    Jan 25, 2022, 5:45:46 PM1/25/22
    to Gerrit Bot, goph...@pubsubhelper.golang.org, Sean Liao, Ian Lance Taylor, Damien Neil, Gopher Robot, golang-co...@googlegroups.com

    Attention is currently required from: Damien Neil, Sean Liao, Ian Lance Taylor.

    View Change

    1 comment:

    • Patchset:

      • Patch Set #1:

        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.

    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I6a8bfc7cc8fa19adda1ccacfb5b52a9148ac713e
    Gerrit-Change-Number: 380734
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Damien Neil <dn...@google.com>
    Gerrit-CC: Brian Mayer <blee...@gmail.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
    Gerrit-CC: Sean Liao <seank...@gmail.com>
    Gerrit-Attention: Damien Neil <dn...@google.com>
    Gerrit-Attention: Sean Liao <seank...@gmail.com>
    Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
    Gerrit-Comment-Date: Tue, 25 Jan 2022 22:45:38 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Sean Liao <seank...@gmail.com>

    Damien Neil (Gerrit)

    unread,
    Jan 25, 2022, 6:02:54 PM1/25/22
    to Gerrit Bot, Brian Mayer, goph...@pubsubhelper.golang.org, Sean Liao, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com

    Attention is currently required from: Sean Liao, Brian Mayer, Ian Lance Taylor.

    View Change

    1 comment:

    • Patchset:

      • Patch Set #1:

        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.

    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I6a8bfc7cc8fa19adda1ccacfb5b52a9148ac713e
    Gerrit-Change-Number: 380734
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Damien Neil <dn...@google.com>
    Gerrit-CC: Brian Mayer <blee...@gmail.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
    Gerrit-CC: Sean Liao <seank...@gmail.com>
    Gerrit-Attention: Sean Liao <seank...@gmail.com>
    Gerrit-Attention: Brian Mayer <blee...@gmail.com>
    Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
    Gerrit-Comment-Date: Tue, 25 Jan 2022 23:02:47 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Sean Liao <seank...@gmail.com>
    Comment-In-Reply-To: Brian Mayer <blee...@gmail.com>
    Comment-In-Reply-To: Ian Lance Taylor <ia...@golang.org>
    Gerrit-MessageType: comment

    Brian Mayer (Gerrit)

    unread,
    Jan 26, 2022, 7:54:37 PM1/26/22
    to Gerrit Bot, goph...@pubsubhelper.golang.org, Sean Liao, Ian Lance Taylor, Damien Neil, Gopher Robot, golang-co...@googlegroups.com

    Attention is currently required from: Damien Neil, Sean Liao, Ian Lance Taylor.

    View Change

    1 comment:

    • Patchset:

      • Patch Set #1:

        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.

    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I6a8bfc7cc8fa19adda1ccacfb5b52a9148ac713e
    Gerrit-Change-Number: 380734
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Damien Neil <dn...@google.com>
    Gerrit-CC: Brian Mayer <blee...@gmail.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
    Gerrit-CC: Sean Liao <seank...@gmail.com>
    Gerrit-Attention: Damien Neil <dn...@google.com>
    Gerrit-Attention: Sean Liao <seank...@gmail.com>
    Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
    Gerrit-Comment-Date: Thu, 27 Jan 2022 00:54:29 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Damien Neil <dn...@google.com>

    Gopher Robot (Gerrit)

    unread,
    Aug 10, 2024, 5:49:54 PM8/10/24
    to Gerrit Bot, Brian Mayer, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Damien Neil, golang-co...@googlegroups.com

    Gopher Robot abandoned this change

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: abandon
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I6a8bfc7cc8fa19adda1ccacfb5b52a9148ac713e
    Gerrit-Change-Number: 380734
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Damien Neil <dn...@google.com>
    Gerrit-CC: Brian Mayer <blee...@gmail.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
    Gerrit-CC: Sean Liao <se...@liao.dev>
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages