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

2010-06-16 Thread Romulo Boschetti
Hi Henrik, 

Do you can help me with this problem ? 

Do you can say me where in The Sorce Code I Have found this functionality ? Or 
where I find more information about Squid Log ?

I can try develope this functionality.  But I don't know where I have start.

Regards, 

Romulo Giordani Boschetti




 Yes I am one of the Squid core developers. 
Thanks for you help. 

It's not a question about porting a patch. The feature you look for have 
not been implemented. 
The patch you found is the old and since long incorporated patch that 
adds the logformat directive. Before this patch Squid only had the two 
predefined log formats and you could not at all change the log format. 
Regards 
Henrik 

Is there the possibility of developing this Feature? 
My company would be willing to pay for it. Do you Would be interested? 

Thanks 





Atenciosamente, 

__ 

Rômulo Giordani Boschetti 

___ ___ 


fre 2010-05-21 klockan 18:08 -0300 skrev Romulo Boschetti: 
 Hey Henrik, 
 
 First of all thanks for your quick reply. Got a question: are you a 
 Squid core developer or something like? I am asking it because we have 
 a project here and we'd need this feature working on Squid 2.7. 
 Actually I could do it myself but the problem of merging those lines 
 is making it right. I am quite affraid because I don't know the whole 
 code and I don't have time enough to do it. Are you interested on 
 porting this patch to Squid version mentioned above? If affirmative, 
 how much would you charge and how much time would you spend on this? 
 
 Regards, 
 
 : email rom...@interop.com.br 
 __ 
 
 
 - Mensagem original - 
 De: Henrik Nordström hen...@henriknordstrom.net 
 Para: Romulo Boschetti rom...@interop.com.br 
 Cc: squid-users@squid-cache.org, Amos Jeffries 
 squ...@treenet.co.nz 
 Enviadas: Sexta-feira, 21 de Maio de 2010 17:47:39 
 Assunto: Re: [squid-users] Content-Type log erro 
 
 fre 2010-05-21 klockan 17:39 -0300 skrev Romulo Boschetti: 
  Hi Henrik, 
  
  Yes, I talking about responses denied by http_reply_access. 
 
 Ok. 
 
 Yes, it would be useful to log the received content-type there. Or in 
 fact to be able to log anything about the incoming response. 
 Unfortunately not supported at the moment. 
 
  I believe the post below refers to exactly my problem, but did not 
 understand how to apply the patch: 
  
 http://www.mail-archive.com/squid-users@squid-cache.org/msg36285.html 
 
 No, that's very very old. It's from the development of the 
 access_log_format directive. At the time of that message this 
 directive 
 did not exist at all in Squid only as a separate patch. 
 
 Regards 
 Henrik 
 
 




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

2010-05-21 Thread 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


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

2010-05-21 Thread Romulo Boschetti
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. 

My Log Denied: 
127734.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. 



Any suggestions... 
Thanks for you help 




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 rom...@interop.com.br 
___ ___ 

- Mensagem original - 
De: Amos Jeffries squ...@treenet.co.nz 
Para: squid-users@squid-cache.org 
Enviadas: Sexta-feira, 21 de Maio de 2010 3:12:43 
Assunto: Re: [squid-users] Content-Type log erro 

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 


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

2010-05-21 Thread Amos Jeffries

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: 
127734.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


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

2010-05-21 Thread Romulo Boschetti
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 rom...@interop.com.br 
___ ___ 

- Mensagem original - 
De: Amos Jeffries squ...@treenet.co.nz 
Para: squid-users@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: 
 127734.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 


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

2010-05-21 Thread Henrik Nordström
fre 2010-05-21 klockan 15:15 -0300 skrev Romulo Boschetti:

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

Are we talking about responses denied by http_reply_access?

Regards
Henrik



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

2010-05-21 Thread Romulo Boschetti

Hi Henrik, 

Yes, I talking about responses denied by http_reply_access. 

But unfortunately I can't use the following configuration , Because it did not 
work too : 

acl videos rep_header Content-Type -i /opt/hsc/webcontrol/squid/etc/str.txt 
http_reply_access deny videos 
logformat mime l-s-85 %a %tr %st %un %mt %Ss %ru %ea %rm %{Content-Type}h 
access_log /opt/hsc/webcontrol/log/access.log mime videos 

Here in this configuration, I tried to force the rep_mime_type directive to 
log in access_log. But don't work too. 

I believe the post below refers to exactly my problem, but did not understand 
how to apply the patch: 
http://www.mail-archive.com/squid-users@squid-cache.org/msg36285.html 

Thanks for you help . 






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 rom...@interop.com.br 
___ ___ 

- Mensagem original - 
De: Henrik Nordström hen...@henriknordstrom.net 
Para: Romulo Boschetti rom...@interop.com.br 
Cc: squid-users@squid-cache.org, Amos Jeffries squ...@treenet.co.nz 
Enviadas: Sexta-feira, 21 de Maio de 2010 16:36:28 
Assunto: Re: [squid-users] Content-Type log erro 

fre 2010-05-21 klockan 15:15 -0300 skrev Romulo Boschetti: 

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

Are we talking about responses denied by http_reply_access? 

Regards 
Henrik 



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

2010-05-21 Thread Henrik Nordström
fre 2010-05-21 klockan 17:39 -0300 skrev Romulo Boschetti:
 Hi Henrik, 
 
 Yes, I talking about responses denied by http_reply_access. 

Ok.

Yes, it would be useful to log the received content-type there. Or in
fact to be able to log anything about the incoming response.
Unfortunately not supported at the moment.

 I believe the post below refers to exactly my problem, but did not understand 
 how to apply the patch: 
 http://www.mail-archive.com/squid-users@squid-cache.org/msg36285.html 

No, that's very very old. It's from the development of the
access_log_format directive. At the time of that message this directive
did not exist at all in Squid only as a separate patch.

Regards
Henrik



[squid-users] Content-Type log erro

2010-05-20 Thread Romulo Boschetti


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 




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 rom...@interop.com.br 
___ ___