Browse Source

[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
personal/stbuehler/ci-build
Glenn Strauss 3 years ago
parent
commit
1f7afa9c70
  1. 2
      doc/scripts/create-mime.conf.pl

2
doc/scripts/create-mime.conf.pl

@ -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;

Loading…
Cancel
Save