diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2021-01-08 07:10:31 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2021-01-08 07:10:31 -0500 |
commit | be8909833b632d0a7dbd939af5e0f876b4e4bf49 (patch) | |
tree | ef80cb957bab58584b98685ce27f261d46b7ac71 /doc | |
parent | a89e94e0bf010af76fe09d70886f0ba83869938d (diff) | |
download | lighttpd-git-be8909833b632d0a7dbd939af5e0f876b4e4bf49.tar.gz |
[doc] create-mime.conf.pl -v for warnings
Do not issue warnings about duplicated entries unless called with -v
/etc/mime.types is not typically edited by the end user,
so the warning trace is noise to most end users.
Diffstat (limited to 'doc')
-rwxr-xr-x | doc/scripts/create-mime.conf.pl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/scripts/create-mime.conf.pl b/doc/scripts/create-mime.conf.pl index 3cb421f6..2a228434 100755 --- a/doc/scripts/create-mime.conf.pl +++ b/doc/scripts/create-mime.conf.pl @@ -5,6 +5,10 @@ use strict; +# future: might use Getopt::Std, but this is simple enough for now +my $verbose = 0; +foreach (@ARGV) { $verbose = 1 if ($_ eq "-v"); } + # text/* subtypes to serve as "text/...; charset=utf-8" # text/html IS NOT INCLUDED: html has its own method for defining charset # (<meta>), but the standards specify that content-type in HTTP wins over @@ -130,7 +134,7 @@ sub add { } } - print STDERR "Duplicate mimetype: '${extension}' => '${mimetype}' (already have '${have}'), merging to 'application/octet-stream'\n"; + print STDERR "Duplicate mimetype: '${extension}' => '${mimetype}' (already have '${have}'), merging to 'application/octet-stream'\n" if $verbose; set ($extension, 'application/octet-stream'); } else { set @_; |