On 07/14/2008 09:17 PM, Michael Kaplan wrote:
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)?

Please see http://wiki.squid-cache.org/SquidFaq/ContentAdaptation

Squid has several APIs for doing what you want. Hacking parseHttpRequest() is one of the worst approaches available, but you can look at how Squid 3.1 or later buffers whole chunked requests if you insist on using that route.

HTH,

Alex.

Reply via email to