Re: Custom log format

From: Jeffrey Mogul <mogul@dont-contact.us>
Date: Mon, 19 Nov 2001 17:54:12 -0800

> 2) a digest (MD5, SHA1, or similar) of message bodies
> (both request and reply bodies)
    
    Not planned unless someone volonteers in implementing the sums..

Having done this once (in a very old version of Squid, V1.1.20), I can
attest that it does not take too much code, but it takes some
care to make sure that you have implemented it correctly. The
problem is that Squid doesn't always buffer the entire response
in memory in the process of forwarding it (especially for non-cachable
responses) and so you need to construct the MD5 incrementally.
It's especially tricky to do the right thing if the client or
server aborts the request/response while in progress.

However, perhaps it would be a good idea to reserve a format
code for this function, even if you don't plan to implement
it right away. That might inspire someone else to do the work.

I'd be happy to supply diffs from my 1.1.20 version, if that
would help anyone. The changes were in ftp.c, http.c, store.c,
and store.h, plus I brought in the MD5 code that RSA released
a decade ago -- I'm sure a faster implementation exists.

-Jeff
Received on Mon Nov 19 2001 - 19:21:37 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:38 MST