Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    Squid 0.4.0 set 'Finish transfer if less than x KB remaining' to -1.

    Scheduled Pinned Locked Moved Cache/Proxy
    5 Posts 2 Posters 2.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • technicalT
      technical
      last edited by

      That setting not accept negative string "-1"

      Im dynamicly caching windows update.

      Default settings keeping files all to download that a make alot of download and bandwith.

      Im try set the set 'Finish transfer if less than x KB remaining' to -1. but "-1 not possible"

      The following input errors were detected:

          'Finish when remaining KB' must contain a positive integer or '-1'.

      so what is new value ?

      Necati Selim GÜNER
      IT Technician

      1 Reply Last reply
      Reply Quote 0
      • D
        doktornotor Banned
        last edited by

        Use this via System Patches.

        
        @@ -953,7 +967,7 @@
        
                if (!empty($post['quick_abort_min'])) {
                        $value = trim($post['quick_abort_min']);
        -               if ((!is_numericint($value)) && ($value !== -1)) {
        +               if ((!is_numericint($value)) && ($value != "-1")) {
                                $input_errors[] = "'Finish when remaining KB' must contain a positive integer or '-1'.";
                        }
                }
        
        
        1 Reply Last reply
        Reply Quote 0
        • technicalT
          technical
          last edited by

          @doktornotor:

          Use this via System Patches.

          
          @@ -953,7 +967,7 @@
          
                  if (!empty($post['quick_abort_min'])) {
                          $value = trim($post['quick_abort_min']);
          -               if ((!is_numericint($value)) && ($value !== -1)) {
          +               if ((!is_numericint($value)) && ($value != "-1")) {
                                  $input_errors[] = "'Finish when remaining KB' must contain a positive integer or '-1'.";
                          }
                  }
          
          

          Patch Contents is that code right ?

          Base Directory = ?

          wich directory to patch ? Please explain detaily (it is inside squid_traffic.xml) or ?

          Thank you.

          Necati Selim GÜNER
          IT Technician

          1 Reply Last reply
          Reply Quote 0
          • D
            doktornotor Banned
            last edited by

            Stick this in there:

            
            --- a/usr/local/pkg/squid.inc       2015-10-12 20:05:23.939006529 +0200
            +++ b/usr/local/pkg/squid.inc    2015-10-14 10:22:42.955506820 +0200
            @@ -953,7 +967,7 @@
            
                    if (!empty($post['quick_abort_min'])) {
                            $value = trim($post['quick_abort_min']);
            -               if ((!is_numericint($value)) && ($value !== -1)) {
            +               if ((!is_numericint($value)) && ($value != "-1")) {
                                    $input_errors[] = "'Finish when remaining KB' must contain a positive integer or '-1'.";
                            }
                    }
            
            

            Leave everything at defaults and use the fine "Test" feature in there if unsure.

            1 Reply Last reply
            Reply Quote 0
            • technicalT
              technical
              last edited by

              @doktornotor:

              Stick this in there:

              
              --- a/usr/local/pkg/squid.inc       2015-10-12 20:05:23.939006529 +0200
              +++ b/usr/local/pkg/squid.inc    2015-10-14 10:22:42.955506820 +0200
              @@ -953,7 +967,7 @@
              
                      if (!empty($post['quick_abort_min'])) {
                              $value = trim($post['quick_abort_min']);
              -               if ((!is_numericint($value)) && ($value !== -1)) {
              +               if ((!is_numericint($value)) && ($value != "-1")) {
                                      $input_errors[] = "'Finish when remaining KB' must contain a positive integer or '-1'.";
                              }
                      }
              
              

              Leave everything at defaults and use the fine "Test" feature in there if unsure.

              thank you so much.

              Necati Selim GÜNER
              IT Technician

              1 Reply Last reply
              Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post
              Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
              Privacy Policy · Cookie Policy