Re: Parsing http within squid

From: Adrian Chadd <adrian_at_freebsd.org>
Date: Tue, 15 Jul 2008 12:03:34 +0800

Well, the important bit to realise is that there's no guaranteed
"entire message" anywhere inside Squid core for the request and reply
body. The icap code may do something to buffer the POST but it could
get big.

For small-scale loads you can get away with just buffering the whole
thing until you've got enough to parse. For larger loads you don't
have this luxury and have to try and heal incremental parsing.

Adrian

2008/7/15 Michael Kaplan <michael.a.kaplan_at_gmail.com>:
> Hi,
>
> I am adding some filtering capabilities to squid (yes I know there are other
> dedicated filter utilities, but I want to do it within squid). I would like
> to get some of the plain text information out of the multipart/form data
> section of the http packet. In client_side.cc, function parseHttpRequest, I
> am able to observe the POST message by printing out the hp->buf portion of
> the httpParser structure. However, it appears to only possess the header
> information, cutting me off at the progma header. Is there a way to get at
> the entire http packet so I can parse even further (i was printing out the
> first hp->bufsize bytes)?
>
> Thanks,
>
> Mike
>
>
Received on Tue Jul 15 2008 - 04:03:41 MDT

This archive was generated by hypermail 2.2.0 : Tue Jul 15 2008 - 12:00:06 MDT