Use the cache directive instead of no_cache for Squid 2.6.
Allow request and reply headers access control rules to be configured separately in Squid 3.0.
Added a page for editing cache manager passwords and the actions that they apply to.
+Comments at the end of lines are now preserved when Webmin changes directives in squid.conf.
local $str = $3;
while($str =~ /^\s*("[^"]*")(.*)$/ ||
$str =~ /^\s*(\S+)(.*)$/) {
- push(@{$dir{'values'}}, $1);
+ local $v = $1;
$str = $2;
+ if ($v !~ /^"/ && $v =~ /^(.*)#/ &&
+ !$dir{'comment'}) {
+ # A comment .. end of values
+ $v = $1;
+ $dir{'postcomment'} = $str;
+ $str = undef;
+ last if ($v eq '');
+ }
+ push(@{$dir{'values'}}, $v);
}
$dir{'line'} = $lnum;
$dir{'index'} = scalar(@get_config_cache);
}
else {
# updating some directive
+ $newv[$i]->{'postcomment'} = $oldv[$i]->{'postcomment'};
$nl = &directive_line($newv[$i]);
local @after = $change && $_[3] ? ( $change ) :
# After last one updated
sub directive_line
{
local @v = @{$_[0]->{'values'}};
-return $_[0]->{'name'}.(@v ? " ".join(' ',@v) : "");
+return $_[0]->{'name'}.(@v ? " ".join(' ',@v) : "").
+ ($_[0]->{'postcomment'} ? " #".$_[0]->{'postcomment'} : "");
}
# renumber(&directives, line, count, [end])