Re: Re: Blocking Yahoo Messege in SQUID

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Tue, 18 Oct 2005 21:59:08 +0200 (CEST)

On Fri, 7 Oct 2005, sharat_ wrote:

> When we send an IM it is wrapped under POST
>
> SQUID logs:*****************************
> 2005/10/03 12:48:33| httpSendRequest: FD 14:
> POST /notify/ HTTP/1.0^M
> Referer: pc161^M
> Accept: application/octet-stream^M
> Cookie: Y=v=1&n=eou8tus3stuc5&l=a0f8bc0d270d30/o&p=m2d2stc413000400&r=5s&lg=us&intl=us; T=z=YpMQDBYvhQDBFwIllf7KDgdNDM0BjA0MTA0MzNPMw--&a=YAE&sk=DAALAVYZRhKwKM&d=c2wBTXpRekFUY3pOamN6TkRRNE5BLS0BYQFZQUUBb2sBWlcwLQF0aXABOVlfdXBDAXp6AVlwTVFEQmdXQQ--^M
> User-Agent: Mozilla/4.01 [en] (Win95; I)^M
> Host: shttp.msg.yahoo.com^M
> Content-Length: 141^M
> Pragma: no-cache^M
> Via: 1.0 192.168.102.17:3128 (squid/2.5.STABLE11-RC2-20050920)^M
> X-Forwarded-For: 192.168.5.113^M
> Cache-Control: max-age=259200^M
> Connection: keep-alive^M
> ^M
> *****************************************
> Regards
> Sharat

Then about the best place to hook into in Squid-2.5 is
httpSendRequestEntity() in http.c if you want to look at the data, or
httpSendRequest() if you want to act on the request headers. But you could
also hook into the client side processing in clientReadRequest.

One slight problem is that this data is "streamed" by Squid, not really
waiting for more than the request headers before forwarding the request.

You could also look into using ICAP to hook into the processing flow,
allowing you to focus more on the actual task than how to hook into the
Squid request forwarding flow.

Regards
Henrik
Received on Tue Oct 18 2005 - 13:59:10 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Nov 01 2005 - 12:00:07 MST