aboutsummaryrefslogtreecommitdiff
path: root/gmid.1
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-07-08 20:29:05 +0000
committerOmar Polo <op@omarpolo.com>2021-07-09 08:30:55 +0200
commitd19951cf0373f6217bce2f97489bc46d6a8837ef (patch)
tree49178f6fd091b2723d3c001c58bde8c57c276a5a /gmid.1
parentd93c819182ba6decf8f7f1787c6ba416f76c315a (diff)
rename `mime MIME EXT' to `map MIME to-ext EXT'
With the newish automatic string concatenation, options like `mime' that accepts two strings as parameter start to become ambiguous: which strings gets concatenated? Instead of trying to document in the manpage which argument(s) is subject to string concatenation, do the concat always and introduce a separator. In the case of mime, `to-ext' now acts as a separator to distinguish. While there, also use a new keyword because it sounds better. It's dead-easy to upgrade to the new configuration, possibly with some sed magic, but for the moment the old `mime' form is preserved: (with a warning!) Will be dropped in the next release.
Diffstat (limited to 'gmid.1')
-rw-r--r--gmid.18
1 files changed, 4 insertions, 4 deletions
diff --git a/gmid.1 b/gmid.1
index ff4e363..11c017e 100644
--- a/gmid.1
+++ b/gmid.1
@@ -196,8 +196,8 @@ may enforce this.
.It Ic ipv6 Ar bool
Enable or disable IPv6 support.
By default is off.
-.It Ic mime Ar mime-type Ar file-extension
-Add a mapping for the given
+.It Ic map Ar mime-type Cm to-ext Ar file-extension
+Add a mapping for
.Ar file-extension
to the given
.Ar mime-type .
@@ -524,7 +524,7 @@ To auto-detect the MIME type of the response
looks at the file extension and consults its internal table.
By default the following mappings are loaded, but they can be
overridden or extended using the
-.Ic mime
+.Ic map
configuration option.
If no MIME is found, the value of
.Ic default type
@@ -590,7 +590,7 @@ ipv6 on # enable ipv6
protocols "tlsv1.3"
-mime "application/rtf" "rtf"
+map "application/rtf" to-ext "rtf"
server "example.com" {
cert "/path/to/cert.pem"