Re: [squid-users] Content-Type log erro

From: Romulo Boschetti <romulo_at_interop.com.br>
Date: Fri, 21 May 2010 15:15:41 -0300 (BRT)

Hi Amos,

First thanks for you help.

The Squid to Deny one specified mime-type it need know who is this mime-type. Correct ?

This is my Cache Log , where the Squid detect the Mime-Type of request web page:

2010/05/21 09:29:50| aclMatchRegex: looking for '^application/x-shockwave-flash$'

With this information the squid could not write the correct mime-type into the log ?

Thanks ,

PS : Sorry for my bad english ... :-)

Atenciosamente,

__________________________________________________________________

Rômulo Giordani Boschetti

IT Consulting - InterOp

( telefone 55 (51) 3216-7030 – Porto Alegre

( telefone 55 (11) 4063-7881 – São Paulo

( telefone 55 (41) 4063-7881 – Curitiba

4 fax 55 (51) 3216-7001
: site www.interop.com.br : email romulo_at_interop.com.br
_______________________________________________ ___________________

----- Mensagem original -----
De: "Amos Jeffries" <squid3_at_treenet.co.nz>
Para: squid-users_at_squid-cache.org
Enviadas: Sexta-feira, 21 de Maio de 2010 10:21:26
Assunto: Re: [squid-users] Content-Type log erro

Romulo Boschetti wrote:
> Hi Amos,
>
> I removing the "logformat" line from my config file
>
> acl video rep_mime_type -i ^video/*$
> http_reply_access deny video
> access_log /opt/hsc/webcontrol/log/access.log
>
> But my problem persist. When I access one youtube video the Mime-type in the log is incorrect. This only happens when a the access is Denied.
>

Oh. gotcha. Right.

What you see is because what gets logged is the mime type of the content
actually sent to the client as a reply.

In this case a text HTML error page was sent back. There is no video
involved beyond the URL.

> My Log Denied:
> 1274444734.862 35 192.168.1.102 TCP_DENIED/403 1891 GET http://s.ytimg.com/yt/swf/watch-vfl165272.swf paulo DIRECT/201.47.0.52 text/html
>
> My Log Accept:
> 1274445021.663 12066 192.168.1.102 TCP_MISS/200 148805 GET http://s.ytimg.com/yt/swf/ad-vfl165210.swf paulo DIRECT/201.47.0.52 application/x-shockwave-flash
>
> That Way I can not see when anybody try access any content prohibited.
>

You will have to do something to look at the denials and their URL if
you want to see what has been successfully denied. There is no reliable
way without having received the content already to know what it was.

>
> ----- Mensagem original -----
> De: "Amos Jeffries"
>
> Romulo Boschetti wrote:
>> Hi,
>>
>> The content-type field in the access.log is always "-" character.
>>
>> The only time I saw "text/html" is when your request is deny.
>>
>> Linux CentOs 5.4
>> Squid Cache: Version 2.7.STABLE5
>>
>> some squid.conf parameters:
>>
>> emulate_httpd_log off
>> acl video rep_mime_type -i ^video/*$
>> http_reply_access deny video
>> logformat squid %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
>> access_log /var/log/squid/access.log
>>
>> I tried several configuration and I always get the same result.
>>
>> I have found the Bug http://bugs.squid-cache.org/show_bug.cgi?id=2298 , but i dont have find more
>> information about resolution of this Bug. And I dont have found any information about solution in the
>> version squid-2.7.STABLE5+ .
>>
>> Thanks
>
>
> Re-defining the "squid" format is not a good idea.
> Try removing the "logformat" line from your config file, leaving
> everything else untouched.
>
> Please report back even if that fixes it. I suspect you have found a bug
> in the custom format handling.
>
>
> Amos

-- 
Please be using 
Current Stable Squid 2.7.STABLE9 or 3.1.3 
Received on Fri May 21 2010 - 18:16:17 MDT

This archive was generated by hypermail 2.2.0 : Sat May 22 2010 - 12:00:06 MDT