Re: Observing packets in Squid

From: Henrik Nordstrom <henrik_at_henriknordstrom.net>
Date: Wed, 16 Jul 2008 00:33:36 +0200

Squid doesn't keep the whole POST. Only request headers and a bit of the
body at a time as needed to copy the body content over to the outgoing
connection.

I assume you talk about parseHttpRequest(). This function will be called
until there is a complete header to parse. See some lines down where it
checks for the end of the headers.

But I am still a little confused about what you are trying to do. What
should happen if the request is not to be forwarded? And based on which
kinds of criterias?

On tis, 2008-07-15 at 16:51 -0400, Michael Kaplan wrote:
> I'm examining POST messages, primarily the mutlipart/formdata section. I
> am looking at the hp->buf within processHttpRequest function in
> client_side.cc, but it did not appear that this structure contained the
> whole post messages - only the beginning of the http header, and not
> some of the additional headers that appeared lower in the message. I am
> trying to find a way to get more the header information. Potentially I
> may not want Squid to forward the POST on to the destination.
>
> Mike
>
>
> Henrik Nordstrom wrote:
> > On tis, 2008-07-15 at 12:11 -0400, Michael Kaplan wrote:
> >
> >
> >> Within Squid, I want to add a module that filters the traffic entering
> >> Squid from the internal network sitting behind the Squid proxy dedicated
> >> machine. Preferably this module would examine the traffic before Squid
> >> takes much action, allowing my module to choose whether or not to pass
> >> on the packet further in Squid for processing.
> >>
> >
> > Hmm.. Squid does not operate on packets. Squid is an application ontop
> > of TCP/IP. When Squid sees the data it has already been processed by the
> > TCP/IP stack, serialized into a TCP stream and fed to Squid as a
> > sequence of octets from the TCP stream.
> >
> > At that point it's not an option to not further process the data within
> > Squid.
> >
> > What is your actual goal with this?
> >
> > Regards
> > Henrik
> >
> >
> >
> >
Received on Tue Jul 15 2008 - 22:33:40 MDT

This archive was generated by hypermail 2.2.0 : Wed Jul 16 2008 - 12:00:06 MDT