version 1.43.2.8, 2020/09/06 21:51:19
|
version 1.53, 2020/09/06 18:13:11
|
Line 245 else {
|
Line 245 else {
|
my @rewrites; |
my @rewrites; |
if (opendir(my $dir,$ssldir)) { |
if (opendir(my $dir,$ssldir)) { |
my @sslconf_files; |
my @sslconf_files; |
foreach my $file (grep(!/^\./,readdir($dir))) { |
foreach my $file (!grep(/^\.$/,readdir($dir))) { |
next if ($file =~ /\.rpmnew$/); |
|
if (open(my $fh,'<',"$ssldir/$file")) { |
if (open(my $fh,'<',"$ssldir/$file")) { |
while (<$fh>) { |
while (<$fh>) { |
if (/^\s*<VirtualHost\s+[^:]*\:443>\s*$/) { |
if (/^\s*<VirtualHost\s+[^:]*\:443>\s*$/) { |
Line 258 else {
|
Line 257 else {
|
} |
} |
} |
} |
if (@sslconf_files) { |
if (@sslconf_files) { |
|
my @rewrites; |
foreach my $file (@sslconf_files) { |
foreach my $file (@sslconf_files) { |
if (open(my $fh,'<',"$ssldir/$file")) { |
if (open(my $fh,'<',"$ssldir/$file")) { |
my ($rewrite,$num) = (0,0); |
my ($rewrite,$num) = (0,0); |
while (<$fh>) { |
while (<$fh>) { |
if ($rewrite) { |
if ($rewrite) { |
if (/^\s*<\/IfModule>/) { |
if (/\s*<\/IfModule>/) { |
$rewrite = 0; |
$rewrite = 0; |
$num ++; |
$num ++; |
} else { |
} else { |
chomp(); |
chomp(); |
s/^\s+|\s+$//g; |
s/^(\s+|\s+)$//g; |
push(@{$rewrites[$num]},$_); |
push(@{$rewrites[$num]},$_); |
} |
} |
} elsif (/^\s*<IfModule\s+mod_rewrite.c>/) { |
} elsif (/^\s*<IfModule\s+mod_rewrite.c>/) { |
Line 293 else {
|
Line 293 else {
|
} |
} |
} |
} |
} |
} |
if ($found >= scalar(@expected)) { |
if ($found >= @expected) { |
$gotrules = 1; |
$gotrules = 1; |
last; |
last; |
} |
} |