LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-15-2006, 04:54 PM   #1
andybrr
Member
 
Registered: Mar 2006
Posts: 54

Rep: Reputation: 15
Question Limiting Download


Hi,

Does anyone know if it is possible to limit download size with squid? For example: I want to limit the file size to only 100K, if the user tries to download bigger than 100K, it gets the Access Denied ?

Anderson
 
Old 09-15-2006, 09:56 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Sort of - the only info I've seen on this is at http://wiki.squid-cache.org/SquidFaq...d51b035c00b904. It says:
Quote:
Can I prevent users from downloading large files?

You can set the global reply_body_max_size parameter. This option controls the largest HTTP message body that will be sent to a cache client for one request.

If the HTTP response coming from the server has a Content-length header, then Squid compares the content-length value to the reply_body_max_size value. If the content-length is larger, the server connection is closed and the user receives an error message from Squid.

Some responses don't have Content-length headers. In this case, Squid counts how many bytes are written to the client. Once the limit is reached, the client's connection is simply closed.

Note that "creative" user-agents will still be able to download really large files through the cache using HTTP/1.1 range requests.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Linux/UNIX: Double your download speed with download accelerator LXer Syndicated Linux News 1 09-28-2006 07:44 AM
Fast Download Site for Linux, enables >4GB Download of single file TigerLinux Linux - Distributions 9 10-29-2005 12:45 PM
Restricting Download based on total download using Squid,SARG& Webmin jomy Linux - Networking 0 04-27-2005 06:04 AM
hdd-related download problem(upload 4-5MB/s, download ~1MB/s) tine Linux - Hardware 4 09-15-2004 03:06 PM
Konqueror wont download download TAR,ZIP file but preview Velocide Linux - Newbie 0 03-22-2004 06:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration