Re: tracking POST-queries

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Wed, 23 Mar 2005 22:50:15 +0100 (CET)

On Wed, 23 Mar 2005, Kushnarev Dmitriy wrote:

> For my project i need such functionality in SQUID as registration of
> POST-query & storing it to file. I've created functions for writing
> contents of POST-query to my own log-files. Interception of contents
> i've made in file client_side.c in httpRequestFree function

This is too late, as you have already discovered.

Squid does not buffer the whole POST, instead if just keeps a small
portion in memory, freeing data as it gets sent to the server.

The request body processing takes place in clientProcessBody. This
function is called both when there is additional request body content
received from the client and when the upstream protocol handler wants
more request body to sent to the server. The best place to intercept this
data is probably next to the xmemcpy moving the data from the connection
buffer to the recipient buffer.

Regards
Henrik
Received on Wed Mar 23 2005 - 14:50:20 MST

This archive was generated by hypermail pre-2.1.9 : Fri Apr 01 2005 - 12:00:04 MST