Emil Podlaszewski wrote:
I'm
testing something similar on Wikia right now. We have a problem with
Google Analytics that assign unique cookies to each visitor.
Please see the attached patch that I wrote two days ago. It's pretty ugly
as I'm not a good C programmer. There is still a lot to do. Making this
'feature' configurable via squid.conf would be first such thing.
Mailman ate the attachement. The patch can be found here:
http://svn.wikimedia.org/viewvc/mediawiki/branches/wikia/google-analytics/s…
Emil
+ if (strcmp(name, "cookie") == 0) {
Does httpHeaderGetByName already lowercase the header name? I have been
looking at HttpHeader.c but didn't find anyhing that suggested so.
+ if (strcmp(cn, "__utma") && strcmp(cn, "__utmb") &&
strcmp(cn,
"__utmc") && strcmp(cn, "__utmv") && strcmp(cn,
"__utmz")) {
Why do you check if the cookie is exactly one of these?
I'd use
if (strncmp(cn, "__utm", 5)
(check if the cookie name starts by __utm) or even ignore all cookies
starting by _ or __