Re: [squid-users] Cancelled downloads

From: Marcello Romani <mromani_at_ottotecnica.com>
Date: Sat, 20 Mar 2010 23:51:32 +0100

Marcello Romani ha scritto:
> CASALI COMPUTERS - Michele Brodoloni ha scritto:
>> Hello,
>> is it possible to stop squid from keep downloading a file when a user
>> stops the download from his browser?
>> If an user initiates a 1GB of web download and then hits “cancel”,
>> squid doesn’t mind it and continues to download until it finishes, and
>> this is a waste of bandwidth.
>>
>> Is there a solution for this behavior?
>>
>> Thanks
>>
>
> Hallo,
> I have the same problem here. I have set quick_abort_min and _max to
> 0 to avoid any (useless, in my situation) download.
>
> But what to do with downloads that have been interrupted before the
> config change ?
>
> I.e., I have now 5-6 huge iso file that are beign downloaded by squid as
> leftover from previous interrupted downloads.
>
> Can I tell squid to abort them via some kind of administrative interface
> (cachemgr doesn't seem to provie such command) or should I go the
> iptables route ?
>
> Thanks in advance.
>

Ok, just for reference: I dig'ed the sites hosting those iso files and
set up some iptables rules in the INPUT chain to block tcp/80 traffic
coming from them, plus some OUPUT chain rules to block outgoing traffic
as well.
Within seconds the wan traffic decreased even though I did not put those
rules on the gateway, only on the squid host.
After some time squid dropped the connection, probably due to a timeout,
and I deleted the blocking rules.

This way I've been able to "cancel" ongoing downloads without restarting
squid.

Marcello
Received on Sat Mar 20 2010 - 22:51:43 MDT

This archive was generated by hypermail 2.2.0 : Thu Mar 25 2010 - 12:00:07 MDT