From 02beecb3974e9010d2deefaf09266286b0c6f408 Mon Sep 17 00:00:00 2001 From: Damien Neil Date: Wed, 26 May 2021 13:43:15 -0700 Subject: [PATCH] mime: document use of the Shared MIME-Info Database For #44513. Fixes #46013. Change-Id: I382603208aa94b66d5220cf0f418b8528a4e4148 Reviewed-on: https://go-review.googlesource.com/c/go/+/322892 Trust: Damien Neil Run-TryBot: Damien Neil TryBot-Result: Go Bot Reviewed-by: Ian Lance Taylor --- doc/go1.17.html | 4 +++- src/mime/type.go | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/go1.17.html b/doc/go1.17.html index da50935a61..771e2a6c8d 100644 --- a/doc/go1.17.html +++ b/doc/go1.17.html @@ -408,7 +408,9 @@ Do not send CLs removing the interior tags from such phrases.
mime

- TODO: https://golang.org/cl/305230: support reading shared mime-info database on unix systems + On Unix systems, the table of MIME types is now read from the local system's + Shared MIME-info Database + when available.

diff --git a/src/mime/type.go b/src/mime/type.go index 9bbbf216a1..26424339af 100644 --- a/src/mime/type.go +++ b/src/mime/type.go @@ -96,9 +96,11 @@ func initMime() { // Extensions are looked up first case-sensitively, then case-insensitively. // // The built-in table is small but on unix it is augmented by the local -// system's mime.types file(s) if available under one or more of these -// names: +// system's MIME-info database or mime.types file(s) if available under one or +// more of these names: // +// /usr/local/share/mime/globs2 +// /usr/share/mime/globs2 // /etc/mime.types // /etc/apache2/mime.types // /etc/apache/mime.types