]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/proxy.cgi
Fixed Proxy unable to handle max download size correct. Added and started to core 45.
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / proxy.cgi
index 2525b6e2f60c241aaad619168f2b4059e34499db..f732c5b68c96add3abd9b0b2d9cadc7c2fa969f9 100644 (file)
@@ -82,7 +82,6 @@ my @templist=();
 my $cachemem=0;
 my $proxy1='';
 my $proxy2='';
-my $replybodymaxsize=0;
 my $browser_regexp='';
 my $needhup = 0;
 my $errormessage='';
@@ -3870,19 +3869,18 @@ END
 request_body_max_size $proxysettings{'MAX_OUTGOING_SIZE'} KB
 END
        ;
-       $replybodymaxsize = 1024 * $proxysettings{'MAX_INCOMING_SIZE'};
        if ($proxysettings{'MAX_INCOMING_SIZE'} > 0) {
-               if (!-z $acl_src_unrestricted_ip) { print FILE "reply_body_max_size 0 deny IPFire_unrestricted_ips\n"; }
-               if (!-z $acl_src_unrestricted_mac) { print FILE "reply_body_max_size 0 deny IPFire_unrestricted_mac\n"; }
+               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 0 deny for_extended_users\n"; }
+                       if (!-z $extgrp) { print FILE "reply_body_max_size none for_extended_users\n"; }
                }
        }
        
-       if ( $replybodymaxsize != '0' )
+       if ( $proxysettings{'MAX_INCOMING_SIZE'} != '0' )
        {
-               print FILE "reply_body_max_size $replybodymaxsize deny all\n\n";
+               print FILE "reply_body_max_size $proxysettings{'MAX_INCOMING_SIZE'} KB all\n\n";
        }
 
        print FILE "visible_hostname";