Re: Log redirector output patch

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Tue, 13 Jun 2006 20:49:33 +0200

tis 2006-06-13 klockan 13:29 -0400 skrev Jean-Francois Levesque:

> I'm interested in squid access log developpement. As my first
> developpement, I made a patch to log the redirector output with the
> logformat (%ro). The patch is attach to this email.
>
> I'd really appreciate to have some feedback about this patch.

Farily straight forward, as you probably discovered.

> In the patch, I free some memory just before allocating the new one at
> redirect.c:73. Is this the right way to free the used memory?

Almost.. this method is used if you need to replace a value with another
one. As this field is unique to the redirector processing it will only
get assigned at most a single value per request..

The actual free of clientHttpRequest members is
client_side.c:httpRequestFree() and you need to free your new element
there.

> Is there a function called to free a complete AccessLogEntry object?

It resides within the clientHttpRequest and is freed as part of the
clientHttpRequest. But I guess the function mentioned above is what you
are asking for..

What is it your redirector is doing? I am thinking that maybe it's
better done as an external acl where there already is extensive hooks to
provide additional information in a friendly manner. The external acl
interface can do everything related to access controls, but can't
rewrite the requested URL (other than deny_info redirecting the browser
on access denial..)

Regards
Henrik

Received on Tue Jun 13 2006 - 12:49:38 MDT

This archive was generated by hypermail pre-2.1.9 : Fri Jun 30 2006 - 12:00:02 MDT