Squid 0.4.0 set 'Finish transfer if less than x KB remaining' to -1.
-
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 ?
-
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'."; } } -
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.
-
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.
-
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.
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 LoginPrivacy Policy · Cookie Policy