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

Reply via email to