diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2021-01-09 12:38:22 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2021-01-09 12:39:45 -0500 |
commit | 0b4733f244acb94299fa2c5af6bedf745295dbeb (patch) | |
tree | 56874aa4d4bb82619701cb0f5022e39288c0229c /doc/scripts | |
parent | 8faa456fc88f29dd108d49bf417fcb1b05d11bbc (diff) | |
download | lighttpd-git-0b4733f244acb94299fa2c5af6bedf745295dbeb.tar.gz |
[doc] create-mime.conf.pl -v silent for mult vnd
Do not issue trace if multiple */vnd.* register the same extension
(silently mark mime-type for extension as application/octet-stream)
Diffstat (limited to 'doc/scripts')
-rwxr-xr-x | doc/scripts/create-mime.conf.pl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/scripts/create-mime.conf.pl b/doc/scripts/create-mime.conf.pl index 2a228434..dcadf297 100755 --- a/doc/scripts/create-mime.conf.pl +++ b/doc/scripts/create-mime.conf.pl @@ -125,7 +125,8 @@ sub add { # non-vnd.* subtype wins over vnd.* subtype my $have_vnd = ($have_subtype =~ /^vnd\./); - if (($subtype =~ /^vnd\./) ^ $have_vnd) { + my $vnd = ($subtype =~ /^vnd\./); + if ($vnd ^ $have_vnd) { if ($have_vnd) { return set @_; # overwrite } @@ -134,7 +135,9 @@ sub add { } } - print STDERR "Duplicate mimetype: '${extension}' => '${mimetype}' (already have '${have}'), merging to 'application/octet-stream'\n" if $verbose; + if ($verbose && !$vnd) { + print STDERR "Duplicate mimetype: '${extension}' => '${mimetype}' (already have '${have}'), merging to 'application/octet-stream'\n" + } set ($extension, 'application/octet-stream'); } else { set @_; |