]> Cypherpunks.ru repositories - gostls13.git/commitdiff
mime: document use of the Shared MIME-Info Database
authorDamien Neil <dneil@google.com>
Wed, 26 May 2021 20:43:15 +0000 (13:43 -0700)
committerDamien Neil <dneil@google.com>
Wed, 26 May 2021 22:41:35 +0000 (22:41 +0000)
For #44513.
Fixes #46013.

Change-Id: I382603208aa94b66d5220cf0f418b8528a4e4148
Reviewed-on: https://go-review.googlesource.com/c/go/+/322892
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
doc/go1.17.html
src/mime/type.go

index da50935a61250db4e7718052ed0b58dbb54079fc..771e2a6c8d9feb11a3ac1400420ffe42bd40d79d 100644 (file)
@@ -408,7 +408,9 @@ Do not send CLs removing the interior tags from such phrases.
 <dl id="mime"><dt><a href="/pkg/mime/">mime</a></dt>
   <dd>
     <p><!-- CL 305230 -->
-      TODO: <a href="https://golang.org/cl/305230">https://golang.org/cl/305230</a>: 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
+      <a href="https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-0.21.html">Shared MIME-info Database</a>
+      when available.
     </p>
   </dd>
 </dl><!-- mime -->
index 9bbbf216a1d1d96fc35ba6c2e1e4d569b361fb8b..26424339af8d03b319c5dbb870f3562e80cde891 100644 (file)
@@ -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