Skip to content

Commit

Permalink
Make sure the two lists TOMCAT_ONLY and TOMCAT_KEEP
Browse files Browse the repository at this point in the history
are disjoint.


git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1845463 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
rainerjung committed Nov 1, 2018
1 parent d9f2211 commit cc0f0aa
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions res/scripts/check-mime.pl
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,18 @@ sub HELP_MESSAGE {
# Switch locale for alphabetical ordering
setlocale(LC_COLLATE, $LOCALE);

# Check whether TOMCAT_ONLY and TOMCAT_KEEP are disjoint
for $extension (sort keys %TOMCAT_ONLY) {
if (exists($TOMCAT_KEEP{$extension})) {
push(@extensions, ($extension));
}
}
if (@extensions > 0) {
print STDERR "FATAL Lists TOMCAT_ONLY and TOMCAT_KEEP must be disjoint.\n";
print STDERR "FATAL Common entries are: " . join(', ', @extensions) . " - Aborting!\n";
exit 6;
}

# Read and parse httpd mime.types, build up hash extension->mime-type
open($mimetypes_fh, '<', $opt_m) or die "Could not open file '$opt_m' for read - Aborting!";
while (<$mimetypes_fh>) {
Expand Down

0 comments on commit cc0f0aa

Please sign in to comment.