From f0b7534f7f7b853f993bcb9e5b3f717167df416e Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 10 Jul 2014 14:04:05 +0200 Subject: [PATCH] proxy.cgi: Move {minimum,maximum}_object_size before cache_dir. The cache_dir directive ignores the object size directives if those have not been set prior to cache_dir. http://bugs.squid-cache.org/show_bug.cgi?id=3830 --- html/cgi-bin/proxy.cgi | 58 ++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 30 deletions(-) diff --git a/html/cgi-bin/proxy.cgi b/html/cgi-bin/proxy.cgi index 03fd1ab7b..9c3be0b05 100644 --- a/html/cgi-bin/proxy.cgi +++ b/html/cgi-bin/proxy.cgi @@ -3169,9 +3169,35 @@ END print FILE "\n"; } - if ($proxysettings{'CACHE_SIZE'} ne '0') + if ($proxysettings{'CACHE_SIZE'} > 0) { + print FILE < 0) { + if (!-z $acl_src_unrestricted_ip) { print FILE "reply_body_max_size none IPFire_unrestricted_ips\n"; } + if (!-z $acl_src_unrestricted_mac) { print FILE "reply_body_max_size none IPFire_unrestricted_mac\n"; } + if ($proxysettings{'AUTH_METHOD'} eq 'ncsa') + { + if (!-z $extgrp) { print FILE "reply_body_max_size none for_extended_users\n"; } + } + } + + if ( $proxysettings{'MAX_INCOMING_SIZE'} != '0' ) { - print FILE "cache_dir aufs /var/log/cache $proxysettings{'CACHE_SIZE'} $proxysettings{'L1_DIRS'} 256\n\n"; + print FILE "reply_body_max_size $proxysettings{'MAX_INCOMING_SIZE'} KB all\n\n"; } if ($proxysettings{'LOGGING'} eq 'on') @@ -3951,34 +3977,6 @@ END print FILE "http_reply_access allow all\n\n"; } - if ($proxysettings{'CACHE_SIZE'} > 0) - { - print FILE < 0) { - if (!-z $acl_src_unrestricted_ip) { print FILE "reply_body_max_size none IPFire_unrestricted_ips\n"; } - if (!-z $acl_src_unrestricted_mac) { print FILE "reply_body_max_size none IPFire_unrestricted_mac\n"; } - if ($proxysettings{'AUTH_METHOD'} eq 'ncsa') - { - if (!-z $extgrp) { print FILE "reply_body_max_size none for_extended_users\n"; } - } - } - - if ( $proxysettings{'MAX_INCOMING_SIZE'} != '0' ) - { - print FILE "reply_body_max_size $proxysettings{'MAX_INCOMING_SIZE'} KB all\n\n"; - } - print FILE "visible_hostname"; if ($proxysettings{'VISIBLE_HOSTNAME'} eq '') { -- 2.39.2