Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The reply_body_max_size in Squid checks for the content length of the reply and if it is greater than the specified size it throws an error to the user.

I don't want to show an error page if this exceeds the limit. Is there any way or any workaround in Squid to create an acl or something similar to filter based on their content length ?

Something similar to the following

if ( content_size > 15MB ) { // do this; } else { // do this; }

share|improve this question
What do you want to do if the content is >15Mb ? Similarly < 15Mb ? – Iain Apr 27 '11 at 12:02
@lain In Squid I am using "tcp_outgoing_address" directive to change the source address based on a acl which currently checks for URL with .exe, .iso extension and then redirect the request through a different ISP link using source based IP routing. This works perfectly fine. If I am able to filter content >15Mb using some acl or any other method I would like to use it with "tcp_outgoing_address" in the similar way. – Supratik Apr 27 '11 at 12:54

Check this reply_body_max_size directive

share|improve this answer
I have already checked the reply_body_max_size directive, using it I am able to filter traffic >15MB, but it shows an error page to the user which I don't want. I want to use it with tcp_outgoing_address similar like an acl. Any idea on how to do it ? – Supratik Apr 28 '11 at 13:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.