[doc] minor adjust create-mime.conf.pl regex match (#2942)

'-' in char class should be at beginning or end, or escaped with \-
so that it does not signify a char range in the char class

(In the prior regex, the misuse permitted matching the comma char,
which while mostly harmless, was not what was intended)

x-ref:
  "incorrect behaviour of create-mime.assign.pl"
  https://redmine.lighttpd.net/issues/2942
This commit is contained in:
Glenn Strauss 2019-03-14 01:38:46 -04:00
parent f60f1a279e
commit 1f7afa9c70
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ while (<MIMETYPES>) {
chomp;
s/\#.*//;
next if /^\w*$/;
if (/^([a-z0-9\/+-.]+)\s+((?:[a-z0-9.+-]+[ ]?)+)$/i) {
if (/^([a-z0-9\/+.-]+)\s+((?:[a-z0-9+.-]+[ ]?)+)$/i) {
my $mimetype = $1;
my @extensions = split / /, $2;