Re: Reply_boby_size_max
Olá Mrcos
Em Qua, 2005-01-26 às 11:41 -0200, Marcos Vinicius Lazarini escreveu:
> On Wed, 26 Jan 2005, Paulo Ricardo Bruck wrote:
>
> > Em Qua, 2005-01-26 às 10:23 -0300, Marlo - Raidbr escreveu:
> > > Dae pessoal,
> >
> > Olá Marlo
> > >
> > > To precisando bloquear no squid downloads maiores que 20 MB, vi que o
> > > squid tem a opção " reply_boby_size_max" mas nao consegui aplicar no
> > > squid 2.5, só da pau .. alguem ja usou ou conhece outra forma de
> > > bloquear
> > >
> > humm o que vc quer dizer com "so deu pau" ????
> > seguindo a espec do squid:
> >
> > # TAG: request_body_max_size (KB)
> > # This specifies the maximum size for an HTTP request body.
> > # In other words, the maximum size of a PUT/POST request.
> > # A user who attempts to send a request with a body larger
> > # than this limit receives an "Invalid Request" error message.
> > # If you set this parameter to a zero (the default), there will
> > # be no limit imposed.
> > #
> > #Default:
> > # request_body_max_size 0 KB
> >
> >
> > se vc colocar a linha no squid.conf como:
> > request_body_max_size 20000 KB
> > deve funcionar, se não funcionar poste as 30 ultimas linhas do
> > seu /var/log/squid/cache.log aqui
>
> Lendo a msg acima, estou com uma duvida: ao fazer download nao seria um
> 'GET request'? 'PUT/POST' eh quando nos enviamos algo para o servidor,
> tipo anexo de um email, acessando o webmail... Ou estou muito por fora?
>
> (Na verdade, lendo o texto de novo, um HTTP request eh o que voce manda
> pro servidor, e um HTTP 'answer' seria o que ele te manda, no caso o
> download)
>
veja o que fala o aruivo de conf do squid.conf 2.5.7-3 ( este mais
completo)
# TAG: reply_body_max_size bytes allow|deny acl acl...
# This option specifies the maximum size of a reply body in
bytes.
# It can be used to prevent users from downloading very large
files,
# such as MP3's and movies. When the reply headers are recieved,
# the reply_body_max_size lines are processed, and the first line
with
# a result of "allow" is used as the maximum body size for this
reply.
# This size is checked twice. First when we get the reply headers,
# we check the content-length value. If the content length value
exists
# and is larger than the allowed size, the request is denied and
the
# user receives an error message that says "the request or reply
# is too large." If there is no content-length, and the reply
# size exceeds this limit, the client's connection is just closed
# and they will receive a partial reply.
#
# WARNING: downstream caches probably can not detect a partial
reply
# if there is no content-length header, so they will cache
# partial responses and give them out as hits. You should NOT
# use this option if you have downstream caches.
#
# If you set this parameter to zero (the default), there will be
# no limit imposed.
#
#Default:
# reply_body_max_size 0 allow all
entao voltando se vc quer bloquear dowloads maiores que 20M, coloque
reply_body_max_size 20000000 allow all
e veja que se vc quizer pode fazer isto incluindo com alguma acl
específica.... bache estes caras do squid são bão.....80)
[]s
--
Paulo Ricardo Bruck - consultor
Contato Global Solutions
tel 011 5031-4932 fone/fax 011 5034-1732 cel 011 9235-4327
Reply to: